in 786 by forming a second defensive line along northern Syria, the al-'Awasim, and was reputed to be spending alternating years leading the Hajj and leading a campaign into Anatolia, including the largest expedition assembled under the Abbasids, in 806. Continuing a trend started by his immediate predecessors, his reign also saw the development of far more regular contacts between the Abbasid court and Byzantium, with the exchange of embassies and letters being far more common than under the Umayyad rulers. Despite Harun's hostility, "the existence of embassies is a sign that the Abbasids accepted that the Byzantine empire was a power with which they had to deal on equal terms" (Kennedy). Civil war occurred in the Byzantine Empire, often with Arab support. With the support of Caliph Al-Ma'mun, Arabs under the leadership of Thomas the Slav invaded, so that within a matter of months, only two themata in Asia Minor remained loyal to Emperor Michael II. When the Arabs captured Thessalonica, the Empire's second largest city, it was quickly re-captured by the Byzantines. Thomas's 821 siege of Constantinople did not get past the city walls, and he was forced to retreat. The Arabs did not relinquish their designs on Asia Minor and in 838 began another invasion, sacking the city of Amorion. Sicily, Italy and Crete While a relative equilibrium reigned in the East, the situation in the western Mediterranean was irretrievably altered when the Aghlabids began their slow conquest of Sicily in the 820s. Using Tunisia as their launching pad, the Arabs started by conquering Palermo in 831, Messina in 842, Enna in 859, culminating in the capture of Syracuse in 878. This in turn opened up southern Italy and the Adriatic Sea for raids and settlement. Byzantium further suffered an important setback with the loss of Crete to a band of Andalusian exiles, who established a piratical emirate on the island and for more than a century ravaged the coasts of the hitherto secure Aegean Sea. Byzantine resurgence, 863–11th century In 863 during the reign of Michael III, the Byzantine general Petronas defeated and routed an Arab invasion force under the command of Umar al-Aqta at the Battle of Lalakaon inflicting heavy casualties and removing the Emirate of Melitene as a serious military threat. Umar died in battle and the remnants of his army was annihilated in subsequent clashes, allowing the Byzantines to celebrate the victory as