A city already existed at this site during the time of the Phoenicians and Romans; classically it was known as Ruspae and later as Henchir Sbia or just Sbia. In the sixth century it was known as Ruspina, and had a western church diocese. It was destroyed during the Arab conquest of North Africa.[citation needed] Mahdia was founded by the Fatimids under the Caliph Abdallah al-Mahdi in 921 and made the capital city of Ifriqiya, by caliph Abdallah El Fatimi. It was chosen as the capital because of its proximity to the sea, and the promontory on which an important military settlement had been since the time of the Phoenicians. In 1087 the town was attacked by raiding ships from Genoa and Pisa who burned the Muslim fleet in the harbor. This played a critical role in winning control of the Western Mediterranean and allowing the First Crusade to be supplied by sea. The Zirid dynasty had its residence here in the 11th century, but was brought to an end by the Norman conquest of the city in 1148. In 1160 the city comes under Almohad rule.