Andrew III's death created an opportunity for about a dozen lords, or "oligarchs", who had by that time achieved de facto independence of the monarch to strengthen their autonomy. They acquired all royal castles in a number of counties where everybody was obliged either to accept their supremacy or to leave. In Croatia the situation for the crown became even more dire, as viceroy Paul Šubić and the Babonić family achieved de facto independence, with Paul Šubić even minting his own coin and being called by contemporary Croatian historians as the "uncrowned king of the Croats".
At the news of Andrew III's death, viceroy Šubić invited Charles of Anjou, the late Charles Martel's son, to claim the throne, who hurried to Esztergom where he was crowned king. However, most secular lords opposed his rule and proposed the throne to King Wenceslaus II of Bohemia's namesake son. A papal legate persuaded all the lords to accept Charles of Anjou's rule in 1310, but most territories remained out of royal control. Assisted by the prelates and a growing number of lesser nobles, Charles I launched a series of expeditions against the great lords. Taking advantage of the lack of unity among them, he defeated them one by one. He won his first victory in the battle of Rozgony (present-day Rozhanovce, Slovakia) in 1312.