The Kingdom of Thessalonica was a short-lived Crusader State founded after the Fourth Crusade over conquered Byzantine lands in Macedonia and Thessaly.
After the fall of Constantinople to the crusaders in 1204, Boniface of Montferrat, the leader of the crusade, was expected by both the Crusaders and the defeated Byzantines to become the new emperor. However, the Venetians felt that Boniface was too closely tied to the Byzantine Empire, as his brother Conrad had married into the Byzantine royal family. The Venetians wanted an emperor whom they could control more easily, and with their influence, Baldwin of Flanders was elected as emperor of the new Latin Empire.
Boniface reluctantly accepted this, and set out to conquer Thessalonica, the second-largest Byzantine city after Constantinople. At first he had to compete with Emperor Baldwin, who also wanted the city. He then went on to capture the city later in 1204 and set up a kingdom there, subordinate to Baldwin, although the title of "king" was never officially used. Late 13th and 14th century sources suggest that Boniface based his claim to Thessalonica on the statement that his younger brother Renier had been granted Thessalonica on his marriage to Maria Komnene in 1180.
Michael I of Epirus, a former ally of Boniface, attacked the kingdom in 1210, as did the Bulgarians. Henry of Flanders eventually defeated both, but after Michael's death in 1214, his brother and successor Theodore began anew the assault on the kingdom. Over the next nine years Theodore gradually conquered all of Thessalonica except the city itself, as the Latin Empire could spare no army to defend it while they were busy fighting the Byzantine Empire of Nicaea in Asia. In 1224, just as Demetrius had become old enough to take power for himself, Theodore finally captured Thessalonica and the kingdom became part of the Despotate of Epirus.