It is narrated from Sayyiduna Ubadah bin al-Samit (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) "decreed pre-emption between partners in houses and in lands."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشفعة / 11596