Battle of Khaybar
A precedent for the dhimma contract was established with the agreement between Muhammad and the Jews after the Battle of Khaybar, an oasis near Medina. Khaybar was the first territory attacked and conquered by Muslims. When the Jews of Khaybar surrendered to Muhammad after a siege, Muhammad allowed them to remain in Khaybar in return for handing over to the Muslims one half their annual produce.