The Sack of Thessalonica in 904 by Saracen pirates was one of the worst disasters to befall the Byzantine Empire in the 10th century. A Muslim fleet, led by the renegade Leo of Tripoli, and with the imperial capital of Constantinople as its initial target, sailed from Syria. The Muslims were deterred from attacking Constantinople, and instead turned to Thessalonica, totally surprising the Byzantines, whose navy was unable to react in time. The city walls, especially towards the sea, were in disrepair, while the city's two commanders issued conflicting orders.
After a short siege, the Saracens were able to storm the seaward walls, overcome the Thessalonians' resistance and take the city on 29 July. The sacking continued for a full week, before the raiders departed for their bases in the Levant, having freed 4,000 Muslim prisoners while capturing 60 ships, and gaining a large loot and 22,000 captives, mostly young people. In the event, most of the captives, including John Kaminiates, who chronicled the sack, were ransomed by the Empire and exchanged for Muslim captives.
Frendo, David; Fotiou, Athanasios, eds. (2000), John Kaminiates: The Capture of Thessaloniki, Perth: Australian Association for Byzantine Studies, ISBN1-876503-00-9
Patoura, Sofia (1994), Οι αιχμάλωτοι ως παράγοντες επικοινωνίας και πληροφόρησης (4ος-10ος αι.) [Prisoners of War as Agents of Communication and Information (4th-10th C.)] (in Greek), Athens: National Research Foundation - Center for Byzantine Research, ISBN960-7094-42-5
Vasiliev, A.A. (1968), Byzance et les Arabes, Tome II, 1ére partie: Les relations politiques de Byzance et des Arabes à L'époque de la dynastie macédonienne (867–959) (in French), French ed.: Henri Grégoire, Marius Canard, Brussels: Éditions de l'Institut de Philologie et d'Histoire Orientales, pp. 163–179