Umar bin Khattab expelled the Jews and Christians from the land of Hijaz. When the Messenger of Allah ﷺ gained victory over Khaybar, he intended to expel the Jews from it, since the land, once conquered, belonged to Allah, His Messenger, and the Muslims. He intended to remove the Jews, but they asked the Messenger of Allah ﷺ to let them remain there in exchange for tending the land, with half of the produce going to them.The Messenger of Allah ﷺ said to them, "We will let you remain on these terms for as long as we wish."So they remained there until Umar expelled them to Tayma and Ariha.
أن عمر بن الخطاب أجلى اليهود والنصارى من أرض الحجاز، وأن رسول الله ﷺ لما ظهر على خيبر أراد إخراج اليهود منها. وكانت الأرض حين ظهر عليها الله ولرسوله وللمسلمين، فأراد إخراج اليهود منها، فسألت اليهود رسول الله ﷺ أن يقرهم بها على أن يكفوا عملها، ولهم نصف الثمر. فقال لهم رسول الله ﷺ: نقركم بها على ذلك ما شئنا فقروا بها حتى أجلاهم عمر إلى تيماء، وأريحاء.
Bukhari narrated it in "Cultivation and Sharecropping" (2338), and Muslim narrated it in "Sharecropping" (6/1551), both from the hadith of Abdul-Razzaq, who said, Ibn Jurayj informed us, who said, Musa bin Uqba narrated to me, from Nafi, from Ibn Umar, and he mentioned it, and their wording is the same.