The Tsardom of Vidin () was a medieval Bulgarian state centred in the city of Vidin from 1356 to 1396. Early history In 1257, Rostislav Mikhailovich attacked the Bulgarian capital of Tarnovo, but failed to take it, so he retreated to Vidin where he established himself, claiming the title of Tsar of Bulgaria, and the Hungarians recognized him with this title. Since the middle of the 13th century, the area of Vidin had been autonomous under ineffective Bulgarian overlordship, and was ruled successively by Yakov Svetoslav (died 1276), Shishman (died between 1308 and 1313), and then his son Michael Shishman, who received the high courtly title of despotēs from his cousin, Theodore Svetoslav, and was referred to in a contemporary Venetian source as a Despot of Bulgaria and Lord of Vidin. Jacob Svetoslav was the ruler of a widely autonomous domain of the Second Bulgarian Empire most likely located around Sofia. Seeking further independence and claiming the title of Emperor of Bulgaria, he twice changed allegiance from Bulgaria to the Kingdom of Hungary and vice versa, and the Hungarians recognized his Bulgarian royal rank as their vassal and ruler of Vidin (medieval Bdin). By 1261, he had become a despot, a high-ranking noble in the Bulgarian hierarchy. The title was awarded to him probably by his own suzerain, the ruler of Bulgaria, rather than a Byzantine emperor, possibly Constantine Tih. Jacob Svetoslav was close to the Bulgarian court and pledged loyalty to Constantine. Thus, the tsar made him the ruler of a domain usually considered to have been south of the Vidin region in the west of the Bulgarian Empire. Byzantine sources indicate his possessions lay "near Haemus", thus close to Sofia, between the Hungarian possessions to the north and Macedonia to the south. The death of Stephen V in 1272 meant that he was succeeded by his infant son Ladislaus IV, with the widowed consort and mother of the boy, Elizabeth, as his regent. At the time, Jacob Svetoslav still held Vidin as a Hungarian vassal. Possibly in 1273, Hungarian rule in Braničevo, west of Jacob's domain, was put to an end by two Cuman–Bulgarian nobles, Darman and Kudelin. Cut off from his Hungarian suzerains and facing the menace of a Bulgarian attack from the east, Jacob Svetoslav once again submitted to Bulgarian rule. He arrived in the capital Tarnovo to negotiate his submission with Constantine's consort Maria Palaiologina