Built in the 12th century by the Almoravids as a place of worship, the Great Mosque of Safi has had a turbulent history. It has seen different civilizations come and go, it has been destroyed, rebuilt, and fallen into disrepair again, and for a period even served as a horse stable. Now, nearly nine centuries later, this important part of the Moroccan cultural heritage has been renovated and returned to its former glory. Just one mystery remains: why is the minaret separate from the rest of the mosque?
(Via Google Tranlate)
In the 15th century, Safi opened up to European trade. The Portuguese even appreciated its natural harbor so well that they seized it in 1488, by a combined operation, by land and by sea, mounted from their base in Mogador (Essaouira). Around the city, they raise a wall and build a fortress by the sea. But this occupation does not last long, because from 1541, the Portuguese who have just lost the city of Agadir evacuate Safi voluntarily. This does not interrupt trade with Europe, which on the contrary is intensifying. The French have their part in it. After 1541, the city played a major role in Morocco, as one of the safest and largest seaports in the country. . . . After Sultan Mohammed ben Abdallah built the city of Mogador , he prohibited foreign trade in all Moroccan ports except his newly built city. Consequently, Safi ceased to play a leading role in Moroccan trade.