 The Habsburg Monarchy took control of Vojvodina among other lands by the treaties of Karlovci (1699) and Požarevac (1718).The Serbian patriarch, Arsenije III Čarnojević, fearing the revenge of the Turks, immigrated in the last decade of the 17th century to the Habsburg Monarchy with as many as 36,000 families, but these Serbs mostly went further to the north and settled in the territory of what is now Republic of Hungary with only small part of them settling in the territory of present-day north-western Vojvodina.However, because of this event, the Habsburg Emperor promised religious freedom to all Serbs in the Monarchy as well as the right to elect their own "vojvoda" (military and civil governor).