John Nelipić ruled almost whole Croatia beyond Mount Gvozd de facto independently from Knin until his death in 1344. Following that Louis ordered Nicholas Hahót to launch a campaign to Croatia in the autumn of 1344 (Nicholas did not issue any diploma from August to November because of his military mandate). His army unhindered marched until the fortress Knin which was defended by Nelipić's widow Vladislava in the name of their minor son and heir John II. Nicholas did not attempt to besiege the castle, instead plundered surrounding lands and villages. Fearing from possibility of a prolonged siege, Vladislava asked for peace and swore allegiance to Louis. The Republic of Venice which took advantage of the Croatian feudal anarchy for decades, and gained control over Split and Nin, acquiring most of the coast from Zrmanja River to the mouth of the Cetina since the 1320s, tried to prevent the Hungarian expansion with diplomatic means. The Venetians persuaded the widow not to hand over Knin to Nicholas' army, while aimed to establish an anti-Hungarian coalition among the Croatian lords and the Dalmatian coastal cities. As a result, Louis personally marched across Bihać to Croatia in July 1345 and forced Vladislava and her son to surrender without any military action took place. Gregory Kurjaković, Count of Corbavia and other Croatian noblemen also yielded to him during his stay in Zagreb. In the name of his king, Nicholas Hahót negotiated with Vladislava on the terms of surrender, when she agreed to hand over four castles. Thus Louis restored royal power in Croatia and pacified the country by the end of 1345.
