Narrated Ibn 'Umar:
The Messenger of Allah (ﷺ) made an agreement with the people of Khaibar to work and cultivate in return for half of the fruits or produce.