The Byzantine and Arabic sources agree that Abu Hafs was the leader of a group of refugees from al-Andalus, who landed on the island of Crete and conquered it.
Some settled in Fez in Morocco, but others, numbering over 10,000, took to piracy, probably joined by other Andalusis, landed in Alexandria and took control of the city until 827, when they were besieged and expelled by the Abbasid general Abdullah ibn Tahir al-Khurasani.
[2] At some point in the second half of the reign of Byzantine Emperor Michael II (r. 820–829), the Andalusis landed on Crete and began its conquest.
The same sources also claim that the Muslim landing was initially intended as a raid, and was transformed into a bid for conquest when Abu Hafs himself set fire to their ships.
[8] The Andalusis' landing-place is also unknown; some scholars think that it was at the north coast, at Suda Bay or near where their main city and fortress, Chandax (Arabic: ربض الخندق, romanized: rabḍ al-kḫandaq, lit.
Although it succeeded in occupying much of the island, Theoktistos had to abandon the army due to political intrigues in Constantinople, and the troops left behind were slaughtered by the Arabs.