As the Great Serb Migrations depopulated most of southern Serbia, the Serbs sought refuge across the Danube River in Vojvodina to the north and the Military Frontier in the west, where they were granted rights by the Austrian crown under measures such as the "Statuta Wallachorum" of 1630. Much of central Serbia switched from Ottoman rule to Habsburg control (1686–91) during the Habsburg-Ottoman war (1683–1699). Following several petitions, Emperor Leopold I formally granted Serbs who wished to settle in the northern regions the right to their autonomous crown land. The ecclesiastical centre of the Serbs also moved northwards, to the Metropolitanate of Karlovci, and the Serbian Patriarchate of Peć was once-again abolished by the Ottomans in 1766.