Slovenes, Croats and Serbs, which immediately joined the Kingdom of Serbia to form the Kingdom of Yugoslavia. The formation of the Serbian identity of Vlahs in Croatia began in the 18th century under the influence of the Serbian Orthodox Church (SPC), and most of the local Orthodox priests of the Metropolitanate of Karlovci who were educated in monasteries outside Croatia under the guidance of SPC clergy who came to the southwestern region of the Habsburg monarchy during the Great Migrations of the Serbs (1690–1739). In 1695, Serbian Patriarch Arsenije III Čarnojević organized the SPC's hierarchy in Croatia – the territory of the Military Frontier was 'subjugated' to the Eparchy of Gornji Karlovac, and Varaždin Generalate and the rest of Croatia to the Eparchy of Pakrac (since 1705). The Serbianisation of the Vlachs in southern Croatia was the result of the hierarchical linkage of Orthodox Vlachs from southern Croatian territories, at the time ruled by the Venetians, with the SPC in northern Croatia, which strengthened the ritual and ecclesiastical connection of the Vlachs with the Serb immigrants. In the 1860s, the Serbian thought began spreading among the Orthodox Christians in the Kingdom of Dalmatia. At first through the religious denomination, and by the time as a sign of national affiliation. There was also a brief occurrence when certain Catholic intellectuals, predominantly in Dubrovnik, were won over by the Serbian thought. They were known as "Serb Catholics". The reason for this was that Dalmatia and the Kingdom of Croatia-Slavonia, at the time ruled by Károly Khuen-Héderváry, were extremely disadvantaged so intellectuals did not want to link themselves to them, while at the same time they found newly created Kingdoms of Serbia and Montenegro with their idea of unification of the South Slavs, appealing. With the creation of Yugoslavia, their political goals were achieved, and after that these "one-time Serbs" disappeared from the political stage. Such developments in the spread of Serbian thought in the Croatian lands were the result of Serbian politicians' plans dating back to the first half of the 19th century when Serbia wasn't an independent country, but a province of the Ottoman Empire. According to the 1844 Ilija Garašanin's Načertanije, they intended to establish a Serbian Empire on the territory of the collapsed Ottoman Empire. At first, its borders were supposed to be the borders of the Ottoman Empire and the Slavs in them, but they gradually expanded to