Ages From the first years of the Byzantine Empire, Thessaloniki was considered the second city in the Empire after Constantinople, both in terms of wealth and size, with a population of 150,000 in the mid-12th century. The city held this status until its transfer to Venetian control in 1423. In the 14th century, the city's population exceeded 100,000 to 150,000, making it larger than London at the time. During the sixth and seventh centuries, the area around Thessaloniki was invaded by Avars and Slavs, who unsuccessfully laid siege to the city several times, as narrated in the Miracles of Saint Demetrius. Traditional historiography stipulates that many Slavs settled in the hinterland of Thessaloniki; however, modern scholars consider this migration to have been on a much smaller scale than previously thought. In the ninth century, the Byzantine missionaries Cyril and Methodius, both natives of the city, created the first literary language of the Slavs, the Old Church Slavonic, most likely based on the Slavic dialect used in the hinterland of their hometown. A naval attack led by Byzantine converts to Islam (including Leo of Tripoli) in 904 resulted in the sack of the city. The economic expansion of the city continued through the 12th century as the rule of the Komnenoi emperors expanded Byzantine control to the north. Thessaloniki passed out of Byzantine hands in 1204, when Constantinople was captured by the forces of the Fourth Crusade and incorporated the city and its surrounding territories in the Kingdom of Thessalonica — which then became the largest vassal of the Latin Empire. In 1224, the Kingdom of Thessalonica was overrun by the Despotate of Epirus, a remnant of the former Byzantine Empire, under Theodore Komnenos Doukas who crowned himself Emperor, and the city became the capital of the short-lived Empire of Thessalonica. Following his defeat at Klokotnitsa however in 1230, the Empire of Thessalonica became a vassal state of the Second Bulgarian Empire until it was recovered again in 1246, this time by the Nicaean Empire. In 1342, the city saw the rise of the Commune of the Zealots, an anti-aristocratic party formed of sailors and the poor, which is nowadays described as social-revolutionary. The city was practically independent of the rest of the Empire, as it had its own government, a form of republic. The zealot movement was overthrown in 1350 and the city was reunited with the rest of the