Ostoja was brought to power by the forces of Hrvoje Vukčić, Grand Duke of Bosnia and a Herzog of Split, which deposed QueenJelena Gruba in 1398. In 1403 he sided with King Ladislaus of Naples in his plights against the Hungarian King Sigismund, Bosnia's liege. King Ostoja led a war against the Republic of Dubrovnik, a Hungarian vassalage that year. In 1404, the Bosnians under Hrvoje Vukčić replaced him by his brother Tvrtko II because of his pro-Hungarian views. He had to flee to Hungary, after a stanak in Mile, Visoko.
In 1408, Hungarian King Sigismund managed to defeat the Bosnian nobility and King Stephen Tvrtko II and restore Ostoja to the throne in 1409. King Stephen Ostoja ended the decade-long dispute with the Hungarians but recognizing the suzerainty of the Hungarian crown and in 1412 visited the Hungarian throne in Buda together with the rest of the Bosnian and Serbian nobility including Serbian DespotStefan Lazarević.
King Stephen Ostoja died in September 1418 and his oldest son from his marriage with Kujava, Stephen Ostojić, was elected King of Bosnia.
^His name in Bosnian is rendered Stjepan Ostoja (Cyrillic: Стјепан Остоја), while in Croatian it is Stjepan Ostoja. In Serbian, he is called Stefan Ostoja (Cyrillic: Стефан Остоја).
^John Van Antwerp Fine, Bosnian Institute; The Bosnian Church: Its Place in State and Society from the Thirteenth to the Fifteenth Century, Saqi in association with The Bosnian Institute, 2007