The Book of Prayers (Kitab Al-Salat)

Muslim :: Book 4 : Hadith 1083

Jundub reported: I heard from the Apostle of Allah (may peace be upon him) five days before his death and he said: I stand acquitted before Allah that I took any one of you as friend, for Allah has taken me as His friend, as he took Ibrahim as His friend. Had I taken any one of my Ummah as a friend, I would have taken Abu Bakr as a friend. Beware of those who preceded you and used to take the graves of their prophets and righteous men as places of worship, but you must not take graves as mosques; I forbid you to do that.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star