It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "The neighbour of a house has the greater right to the house (i.e. to pre-emption, shuf'ah, over it)."
Imam Ibn Hibban (may Allah have mercy on him) recorded it like this.