Although he constantly emphasized his subordinance to the King, Tvrtko started regarding the loyalty of the Donji Kraji noblemen to Louis as treachery against himself. In 1363, a conflict broke out between the two men. The cause is not clear, although Louis stated that his intention was to eradicate the Bosnian heretics. By April, the King had begun amassing an army; and in May, officials of the Republic of Ragusa ordered their merchants to leave Bosnia, due to an imminent clash. An army led by Louis himself attacked Donji Kraji, where the nobility was divided in its loyalties between Tvrtko and Louis. A month later an army led by the palatine of Hungary, Nicholas Kont, and the archbishop of Esztergom, Nicholas Apáti, struck Usora. Vlatko Vukoslavić deserted to Louis and surrendered to him the important fortress of Ključ, but Vukac Hrvatinić succeeded in defending the Soko Grad fortress in the "župa" of Pliva, forcing the Hungarians to retreat. In Usora, the Srebrenik Fortress held out against a "massive attack" by the royal army, which suffered the embarrassment of losing the King's seal. The successful defense of Srebrenik marked Tvrtko's first victory against Hungary. The unity of the Bosnian magnates waned as soon as the Hungarians were defeated, weakening Tvrtko's position and that of a united Bosnia. In 1364, Tvrtko, his mother, and his brother were granted citizenship of the Republic of Venice, an honour that guaranteed them sanctuary in Venice in case of necessity, but also obligated Tvrtko to protect Venetian merchants. Various charters issued by the previous bans of Bosnia, and confirmed by Tvrtko on his accession, promised the same protection to Ragusan merchants. In late 1365, however, both republics complained to Tvrtko about the treatment of their merchants by his vassals. Evidently, the Ban had lost control over his feudatories. The anarchy escalated, and in February the following year, the magnates revolted against Tvrtko and dethroned him. Little is known about the circumstances under which Tvrtko was deposed. Accusing the magnates of treachery against "foremostly God" and himself, Tvrtko fled Bosnia with his mother.