Ostoja of Bosnia

Stephen Ostoja (died September 1418) was King of Bosnia from 1398 to 1404 and from 1409 to 1418.
Family connections.
He was a member of the House of Kotromanić, most likely son of Vladislaus and brother of King Stephen Tvrtko I. When duke Hrvoje Vukčić in 1416 died, King Ostoja divorced his old wife Kujava from the house of Radenović and married Hrvoje's widow Jelena Nelipčić the next year. Jelena Nelipčić was the sister of Prince Ivan III Nelipac from the Croatian noble Nelipić (Nelipac) family. That way Ostoja inherited most of Hrvoje's lands.
Rise to power.
Ostoja was brought to power by the forces of Hrvoje Vukčić, (Ban of Croatia, Grand Duke of Bosnia and a Herzog of Split), which deposed Queen Jelena 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 Despot Stefan Lazarević.
King Stephen Ostoja died in September 1418 and his oldest son from his marriage with Kujava, Stephen Ostojić, was elected King of Bosnia.