Sayyiduna Ka'b bin Malik (may Allah be pleased with him) said: A man came to the Prophet (peace and blessings be upon him) and said: O Messenger of Allah! I have settled in the quarter of such-and-such a tribe, and the one who harms me most is the one who has been my neighbour the longest. So the Messenger of Allah (peace and blessings be upon him) sent Sayyiduna Abu Bakr, Umar and Ali (may Allah be pleased with them) to come to the mosque, stand at its door and call out: "Listen! Forty houses count as neighbours, and the one whose neighbour is not safe from his evils will not enter Paradise."
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16193