He continually exerted his influence over Bosnia affairs. He came into conflict with King Ostoja and participated in the plot to remove him from the throne and replacing him with Tvrtko II Kotromanić in 1404. Together with Tvrtko II he formed a movement against Hungary and Sigismund of Luxembourg. After Sigismund's military intervention in 1408 and the massacre of the Bosnian army, he allied himself with Sigismund. However, Hungary's victory in Bosnia and the retaking of the throne by King Ostoja weakened him severely. He soon lost control over the islands he had been given, as well as Split. At this point, he sought help from the Ottoman Empire. The Hungarian army was defeated at Lašva in 1415, but this would open the door to Ottoman expansion into Bosnia. Hrvoje died the following year and his widow, Jelena Nelipčić, married King Ostoja.