Al-Hasan (may Allah have mercy on him) narrates from Sayyiduna Samurah bin Jundub (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) gave a ruling in favour of the neighbour; and in one narration the Prophet (peace and blessings be upon him) said: "The neighbour of a house has more right to the house than anyone else."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشفعة / 11581