It is narrated from Sayyiduna Anas (may Allah be pleased with him) that when the Muhajirun came from Makkah to Madinah and had nothing with them, the Ansar (may Allah be pleased with them) divided their lands, on the condition that they would give them half of their fruits every year and they would work in them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المساقاة / 11634