In 1356 Bulgarian Tsar Ivan Alexander separated off Vidin from the Bulgarian monarchy and set up his son Ivan Sratsimir (1356-1396) as ruler there. In 1365 the Despotate of Vidin was occupied by crusading Hungarians, who the Bulgarians did not expel until 1369. In 1393, Bulgaria in turn was conquered by the Ottoman Empire, bringing an end to the main Bulgarian state. After the Ottomans conquered the Bulgarian breakaway despotates of Dobrudja, Prilep and Velbazhd as well, Vidin was left as the only remaining Bulgarian state. This situation did not last long, however. In 1396 another crusade was organized against the Ottomans and Sratsimir sent troops to join the crusade. After defeating the crusaders outside Nicopolis that same year, Bayezid I annexed Vidin into the Ottoman Empire as punishment for participating in the anti-Ottoman force.