Duke Hrvoje opposed King Sigismund's rule in Bosnia and actively worked to bring Ladislaus of Naples as the new King of Hungary - that would leave Bosnia alone since 1389, and the same year King Sigismund invaded Bosnia. Duke Hrvoje defeated his forces before they reached the City of Vrbas and chased them across the river Una, invading and conquering the župa of Dubica. King Sigismund counterattacked in the fall by assaulting Bosnia. Here, Duke Hrvoje led the forces for King Stephen Ostoja, together with Duke Sandalj Hranić and Duke Pavle Radenović. By the end of 1402, Duke Hrvoje made all Dalmatian cities with the exception of Dubrovnik to recognize King Ladislaus' rule.