Monastir sits on the coast south of Tunis.
Since the 8th century, this ribat guarded the city.
North African ribats are an Islamic defensive structure.
They were built when the inhabitants were threatened by invading European armies.
They were used to scan the sea for hostile ships and as a defence against attacks.
They served not only a military purpose as fortresses, but also a religious purpose as a place of prayer and study for devout soldiers.
In a way, they were kind of a fortified Islamic monastery,