ruled by the Ottoman Empire, Vlach groups moved from southeastern Bosnia (Pavlović area) to central regions of Tešanj and Žepče, also they spread northwest and north of the Sava towards the future Bosanska Krajina. Living on the border of Habsburg Empire they relocated if the social situation was better on the other part of the border. There they received also a special social-militarh system. Before 1516, Vlachs settled nahia Vrbanja, Prusac, Glamoč and Kupres. In 1527 Ferdinand I freed them from feudal obligations, shared booty with them, gave them their own captains (vojvodas) and magistrates (knezes), and freed them to practice Orthodox Christianity. It eventually led to the organisation of the Military Frontier, and the decree Statuta Valachorum by Ferdinand II. It resulted in a situation almost looking like Vlachs fighting against Vlachs. Herzegovinian Vlachs In Southeastern Herzegovina between 1393–1437 many Vlach katuns emerged. The primary lords of the Herzegovinian Vlachs were the Kosača, Pavlović, and Nikolić noble families. The Vlachs from Herzegovina sometime plundered lands of Republic of Ragusa in the 14th and 15th century and grew rich by trade of goods between Ragusa and the mines of Bosnia. Vlachs were surnamed Pliščić, Gleđević, Ugarac, Boban, Mirilović, Vragović, Kresojević, Nenković, Bančić, Pilatovac, Pocrnja, Drobnjak and Riđani. Some of the Banjani and Maleševci (Stanković) were Kosača vassals. Vlachs surnamed Vlahović, Žurović, and Predojević, those belonging to the Pribač Nikolić pasture encampment, and some of the Banjan and Maleševac Vlachs (surnamed Hrebeljanović, Milićiević and Milošević) were Pavlovlić vassals. The Kutlovići were vassals of the Nikolići. The Primilovići belonged to a larger group of Vlachs, for whom no data on lords were found. Other katun Vlachs were Boljuni, Bukvići, Burmazi, Goduni, Hardomilići, Horojevići, Hrabreni, Jurjevići, Kersojevići, Kićurići, Kujavići, Milobradačići, Perventinići, Pribinovići, Rudinjani, Veseličići, Vitkovići, Vojnovići, Vragovići, Zotovići. Vlachs often don't bear "tribe-katun" name as a surname, instead using patronymics, for example katunar Dragić Dobrilović from Boban katun or katunars Klapac Stanković and Radosav Milićević from Maleševac katun. The Ottoman occupation conquered Vlach territories which caused migrations; Ragusan documents in 1386 recorded that some Vlach with their animals found shelter in Ston and Pelješac (...quod recipiantur in Stagno familie, pastores, animalia et carnesia Vlacorum et circum vicinorum propter eorum saluamentum terrore Teucrurum partes discurrentium), in 1466 Korita, Banjani and Riđani east of Trebinje fell. In 1448 Ragusa again accepted in Ston and Pelješac "peasants and Vlachs of duke Stjepan, Radoje Nikolić and Vukašin