Mutarrif bin Abdullah says: A narration from Sayyiduna Abu Dharr al-Ghifari (may Allah be pleased with him) reached me, and I wished that I could meet him. When I met him, I said: O Abu Dharr al-Ghifari! A hadith from you reached me, so I was eager to meet you. He said: May Allah bless your father! Now you have met me, so present it. I said: A hadith has reached me that the Prophet (peace and blessings be upon him) told you that Allah Almighty loves three people and dislikes three people. He said: I do not think of myself that I would attribute a lie to the Prophet (peace and blessings be upon him). The narrator says: I asked: Who are those three kinds of people whom Allah Almighty loves? He said: One is the man who, patiently and hoping for reward, takes part in battle in the way of Allah; he keeps fighting until he is martyred, and this is the one whom you find mentioned in the Book of Allah that you have. Then he recited this verse: "Indeed, Allah Almighty loves those who fight in His way in ranks, as if they were a structure joined with lead." I asked: And who else? He said: "The man who has a bad neighbour who harms him, and he keeps bearing that neighbour's harm with patience, until Allah Almighty suffices him against that neighbour, whether through life or death." (Al-Haythami says:) I say: After this he mentioned the complete hadith.
Al-Nasa'i (may Allah have mercy on him) and others recorded this narration with reference to the neighbour.
Ahmad and al-Tabarani recorded it, and the wording is his; the chain of al-Tabarani and one of Ahmad's two chains have narrators who are the narrators of the "Sahih".