The Messenger of Allah ﷺ made an agreement with the people of Khaybar to give them half of whatever the land produced in fruit or crops.
حدثنا محمد بن الصباح وسهل بن أبي سهل وإسحق بن منصور قالوا حدثنا يحيى بن سعيد القطان عن عبيد الله بن عمر عن نافع
أن رسول الله ﷺ عامل أهل خيبر بالشطر مما يخرج من ثمر أو زرع
Sourced from Bukhari, Farming and Sharecropping, chapter, If the number of years is not stipulated in sharecropping, hadith 2329, and Muslim, Sharecropping, chapter, Sharecropping and Partnership for a Share of the Fruit and Crop, hadith 1551, from the hadith of Yahya Qattan.