The Messenger of Allah ﷺ made an agreement with the people of Khaybar that they would work the land in exchange for half of whatever it produced of fruit or crops.
حدثنا أحمد بن حنبل وزهير بن حرب واللفظ لزهير قالا حدثنا يحيى وهو القطان عن عبيد الله أخبرني نافع
أن رسول الله ﷺ عامل أهل خيبر بشطر ما يخرج منها من ثمر أو زرع