Thessaloniki passed out of Byzantine hands in 1204, when Constantinople was captured by the Fourth Crusade. Thessaloniki and its surrounding territory — the Kingdom of Thessalonica — became the largest fief of the Latin Empire, covering most of north and central Greece. The city was given by emperor Baldwin I to his rival Boniface of Montferrat, but was seized back once more in 1224 by Theodore Komnenos Doukas, the Greek ruler of Epirus, who established the Empire of Thessalonica. After the Battle of Klokotnitsa in 1230, Tsar Ivan Asen II of Bulgaria made the rulers of Thessaloniki his vassals. The city became subordinated to the Empire of Nicaea in 1242, when its ruler, John Komnenos Doukas, lost his imperial title, and was fully annexed in 1246.