Arabs invaded the country in the 7th century, conquering it and seizing Carthage and thereby paving the way for the ruling of a number of Muslim dynasties including the Aghlabids (9th century) and the Zirids (10th century). The Normans of Sicily arrived in the 12th century but their control was rapidly relinquished to the Almohad caliphs who in turn lost their seat to the Berber Hafsids.
The mighty Ottoman Empire took control in the 17th century; although, it allowed the country to be governed semi-autonomously. The Ottoman period was a positive time for Tunisia, helping the country to defeat the Spanish and reclaim a series of islands that were once Tunisian territory. They were unable however, to hold out against the might of the French whose invasion during the 18th century led to a period of French ruling that lasted 75 years.