Safi · The sea castle and the old town
The sea castle and the old town of Safi
Quarter · Check locally · About two hours to walk from the sea castle through the medina to the Kechla
The sea castle and the old town of Safi at a glance
- What it is
- Quarter in Safi
- Entry
- Check locally
- Hours
- Check locally; they change in Ramadan
- Allow
- About two hours to walk from the sea castle through the medina to the Kechla, longer with the museum.
- Built
- The sea castle of Safi was built by the Portuguese in 1515–1517 as part of their chain of coastal forts; its rectangular body sits right on a sea cliff above the Atlantic.
- When to go
- A morning with a big swell, when the waves break hard against the cliff under the castle.
- From the centre
- Start on the shore road below the medina, where the castle meets the sea, then walk up through the old town to the Kechla.
- Access
- The shore road is level; the medina lanes climb, with steps in places.
Safi's old town climbs from the sea to a fortress on the hill. At the bottom, a rectangular stone castle from the early 16th century stands on a cliff with the Atlantic breaking under it. Inside the walls are an Almohad mosque, the ruins of a Portuguese church and the shrine of the town's patron saint, and at the top the Kechla holds the ceramics museum.
In short
Ksar el Bahr, Safi's sea castle, is a rectangular Portuguese fort of the 1510s on a cliff over the Atlantic. It was closed by 2023 for repairs, so you see it from outside. Behind it the walled medina keeps an Almohad mosque and Portuguese church ruins, and the hilltop Kechla holds Dar Soltane and the ceramics museum.
The visit, stop by stop
The sea castle and the old town of Safi in the order you walk it
-
Ksar el Bahr from the shore road
Begin on the shore road, where the sea castle rests on the cliff edge. From the road you see the whole of it: high battlemented walls, rounded and square towers, and the surf breaking at the foot of the rock.
-
The town walls
Walk into the medina through the walls. The Portuguese ringed the town with a strong wall to plans by the brothers Diogo and Francisco de Arruda, drawn up in 1512.
-
The Portuguese church
Inside the medina stand the remains of the Portuguese cathedral, the town's other Manueline building, listed as a monument in 1924. A second Portuguese church, in ruins, was listed in 1930.
-
The Almohad mosque and the shrine of Abu Mohammed Salih
The medina keeps its Almohad mosque and the shrine of Abu Mohammed Salih, the Sufi teacher who founded a ribat in Safi and was buried here in 1234. Both are seen from the lanes outside; only Muslims enter.
-
The Kechla and Dar Soltane
The walk ends at the Kechla, the fortress the Portuguese built above the town. Inside it, Dar Soltane houses the National Ceramics Museum, and the potters' hill by Bab Chaaba is close by.
-
The view from Sidi Bouzid
To see the whole town at once, drive up to the Sidi Bouzid corniche on the cliffs at the north-east edge of town. It looks down over the medina, its monuments and walls, the potters' hill and the port.
The sea castle, Ksar el Bahr
Ksar el Bahr means castle of the sea; the Portuguese called it the Castelo do Mar, and an older Moroccan name is Dar al-Bahr, the house of the sea. Portugal took control of Safi in 1488 and held the town from 1508 to 1541. The castle went up in the 1510s, after the town wall, to guard the harbour, as one link in a chain of Portuguese coastal forts running south from Tangier. Its design recalls an earlier fort at Tangier.
The plan is a rectangle set directly on the cliff over the Atlantic, with rounded and square towers. Inside were the quarters of the Portuguese governor and rooms for prisoners.
- Safi came under Portuguese control in 1488; the fort on the sea went up between 1515 and 1517, one link in Portugal's chain of coastal strongholds running south from Tangier, and its design recalls an older Tangier fort.
- Safi was a Portuguese possession from 1508 to 1541; after the 1512 town wall, the 'Castelo do Mar' was built in the Manueline style as a complementary work to defend the port.
- Under the Saadians the fort was called Dar Al-Bahr, house of the sea.
The Arruda brothers and the Manueline style
Two Portuguese master builders, the brothers Diogo and Francisco de Arruda, worked in Safi in the 1510s. They drew up the town's wall in 1512 and worked on its fortifications, as they did at Azemmour and El Jadida. Francisco is the architect of the Belem Tower in Lisbon, built in 1514, and the two brothers took the flamboyant Gothic of their day and developed it into the Manueline style.
In Safi that style shows in two places, the sea castle and the old cathedral in the medina, both counted among the Manueline buildings outside Portugal.
- The walls of Safi were laid out by the brothers Diogo and Francisco de Arruda (1512); Diogo and Francisco also worked on the fortification of Safi and of Mazagan.
- Francisco de Arruda built the Belem Tower in 1514 for King Manuel I; between 1514 and 1520 he travelled with his brother Diogo to Safi and Mazagan; the brothers took up flamboyant Gothic and developed the Manueline style.
- Manueline buildings outside Portugal include, in Morocco, the Portuguese cistern and Church of the Assumption at Mazagan (El Jadida) and the former cathedral of Safi.
Why the sea castle is closed
The castle has stood on its rock for five centuries, but in this century it was neglected and at risk of collapse, and in 2023 it stood closed, waiting for repairs. That year Morocco's culture minister visited it while work was under way on a project to reinforce the sea front below it and restore the building, starting with studies of its eastern walls.
Until that work is done, plan to see the castle from the shore road. We check its status before your date.
- Neglected in recent decades, the castle was threatened with collapse, and in 2023 it stood closed awaiting repair.
- In 2023 the culture minister visited the Ksar al-Bahr, under maintenance as part of a project to fortify and reinforce the sea front and rehabilitate the monument, with technical studies for restoring its eastern walls.
The medina and its medieval buildings
In the 12th century, when Safi served Marrakech as its harbour under the Almoravids and then the Almohads, the medina grew around a great central mosque with institutions attached to it. Ibn Khaldun called the town Hadirat al-Mouhit, the city of the surrounding sea. In the 14th century the Marinid sultan Abu al-Hassan added a madrasa, along with a hospital and a covered market, as the town traded with Genoa, Seville and Marseille.
The town also had a large Jewish community, which did not live in a separate mellah. The Oulad Zmirro, seven Jewish saints buried in Safi, were honoured by Jews and Muslims alike until the middle of the 20th century.
- In the 12th century Safi served as the port of Marrakech, capital of the Almoravids and then the Almohads.
- Ibn Khaldun called Safi Hadirat al Mouhit; the town had a great central mosque with many institutions; in the 14th century it gained a madrasa built by the Marinid sultan Abu al-Hassan, a bimaristan (hospital) and a qaysariya, and traded with Genoa, Seville and Marseille; the Jewish community did not live in a mellah, and the Oulad Zmirro, seven Jewish saints buried in Safi, were venerated by both communities until the mid-20th century.
- In 2023 the minister also visited Dar Sultan and the Bahia palace, dated to the Almohad era, the Almohad mosque and the Portuguese church.
Abu Mohammed Salih and the pilgrim road
The shrine in the medina belongs to the man Safi still calls its patron saint. Abu Mohammed Salih was born in 1153, taught in Safi and died here in 1234. At the end of the 12th century he founded a ribat, a lodge for teaching and devotion, beside the town, and from it he organised two bodies said to be the first of their kind in Morocco: a Sufi order, and the Taifa des Houjjaj, which arranged the pilgrimage to Mecca through a chain of lodges along the route at a time when many had stopped making the journey. His work is linked to the Rakb al-Hajj, the official pilgrim procession. Local tradition also holds that Safi's Great Mosque was the first mosque built in Morocco.
- Abu Muhammad Salih, born in 1153, died in Safi in 1234 and was buried there; from his ribat in Safi he revived the practice of the Hajj in Morocco and is credited with creating the Rakb al-Hajj.
- At the end of the 12th century Abu Mohammed Salih, patron saint of Safi, founded a ribat beside the town and two religious orders, the first of their kind in Morocco: a tariqa and the Taifa des Houjjaj, which organised the pilgrimage to Mecca through a network of lodges when the pilgrimage had lapsed; the town's great central mosque is described as the first built in Morocco.
- The Taifa des Houjjaj, the pilgrims' brotherhood of Safi, was founded by the patron saint Abu Mohamed Saleh.
- Safi has the first Muslim mosque in the Kingdom (city tourism page).
The Kechla and Dar Soltane
The Kechla is the fortress that crowns the old town, built by the Portuguese and, with the sea castle, one of the two Portuguese fortifications that survive in Safi. Within it is Dar Soltane, the house of the sultan, whose origins go back to the Almohads. In 1762 the Alaouite prince Moulay Hicham built a palace there, known as El-Bahia. Since 1990 it has held the National Ceramics Museum, so the walk through the medina ends among the town's pottery.
- Two Portuguese works still stand in Safi: the sea castle, Ksar el-Bahr, and the Kechla.
- The town was dominated by a fortification built by the Portuguese, the Castelejo ('Kechla').
- Dar Soltane was built by the Almohads; in 1762 the Alaouite prince Moulay Hicham built his palatial residence El-Bahia there; it became the national ceramics museum in 1990.
Other listed buildings around Safi
Fourteen monuments and sites in Safi province are listed as national heritage. Beyond the castle, the church and the potters' quarter, they include Dar Si Aissa, the 19th-century palace of the caid Si Aissa Ben Omar, the kasbahs of Souira Qedima and Ayir on the coast, and the mosque and shrine of Sidi Chiker in the countryside. Souira Qedima, south of Safi, was the main port for Aghmat before Safi took that role in the 12th century.
- Safi province has 14 sites listed as national heritage, including Dar Si Aissa (1953), the kasbah of Souira Qedima (1943), the kasbah of Ayir (1953), and the mosque and marabout of Sidi Chiker (1940).
- Monuments of Safi include the 19th-century palace of the caid Si Aissa Ben Omar (Dar Si Aissa), the fortress of Agouz at Souiria Lakdima and the fortress of Ayir.
- Safi took over in the 12th century from Ribat Kuz, today Souira Kedima, the harbour that Aghmat had used in the 11th century.
Look closer
What to notice inside the The sea castle and the old town of Safi
The arch between tower and castle
The towers are a mix of rounded and square, and one of them is joined to the main building by an arch.
Battlements over the spray
A travel writer in 1929 described the castle as a series of towers and battlemented walls rising straight from the ocean, on a rock where the waves broke in clouds of spray. On a day of big swell, it still looks that way.
The Manueline style
The castle and the church are both Manueline, the late Gothic style of Portugal named after King Manuel I. The other Manueline group in Morocco is at El Jadida.
The protected zone
The castle was listed as a monument in 1922, and in 1924 a zone of artistic protection was drawn around it.
Walk on
Pair the The sea castle and the old town of Safi with these, in this order
- 1
The sea castle and the old town of Safi
You are here. Start at opening time.
- 2
Essaouira
Essaouira is 2 hours south along the coast, and its own sea walls make a good pair with Safi's castle.
- 3
Oualidia
The lagoon at Oualidia lies north on the coast road and is the usual night for routes coming from Casablanca.
- 4
El Jadida
El Jadida's Portuguese city, with its Manueline cistern and church, is the other Portuguese walled town on this coast.
More in Safi, and routes through it
Sources, dates checked and photo credits
Sources
- Wikipedia, Sea Castle (Safi) checked 4 Dec 2026
- Wikidata checked 4 Dec 2026
- Wikipedia, Safim checked 4 Dec 2026
- French Wikipedia, Ksar El Bahr checked 4 Dec 2026
- Wikipedia, Diogo de Arruda checked 4 Dec 2026
- French Wikipedia, Francisco de Arruda checked 4 Dec 2026
- Wikipedia, Estilo manuelino checked 4 Dec 2026
- challenge.ma checked 4 Dec 2026
- Wikipedia, Safi, Morocco checked 4 Dec 2026
- French Wikipedia, Safi checked 4 Dec 2026
- French Wikipedia, Abu Muhammad Sâlih checked 4 Dec 2026
- lematin.ma checked 4 Dec 2026
- safi-ville.com checked 4 Dec 2026
- French Wikipedia, Dar Soltane checked 4 Dec 2026
Drive times come from our route planner, door to door by private car without stops. Each source shows the date we last checked the facts on this page against it.
Photos: Crenellated stone walls of the Kechla in Safi around a paved courtyard: Dahbi fatima zahrae, CC BY-SA 4.0, via Wikimedia Commons (photo credits).
Questions
The sea castle and the old town of Safi: questions before you go
Can you go inside the sea castle in Safi?
Who built Ksar el Bahr?
What is the Kechla in Safi?
Is there anything Portuguese left in the medina?
Ask for a quote
Plan a walk through old Safi
Tell us your dates and your route on the coast. We add a half day with a local guide from the sea castle to the Kechla and the potters' hill, and send one quote.
Thank you, traveller. Your request is with the planners.
A planner replies on WhatsApp within one working day, usually sooner, with a day-by-day plan and one quote for your group. To add something, message us on WhatsApp at +212 701 664 704.
What happens next
- Send your dates and your group.A month, a rough route and a head count are enough to start.
- Get a day-by-day plan and one quote.Drive times, where you sleep, the vehicle and what is included, for your group only.
- Change it, or confirm it.Nothing is booked or charged until you say yes.
- A planner on our US desk or our team in Morocco writes back, depending on the hour you send.
- If your number is on WhatsApp, the reply comes there. If not, by phone or email.
- Your details go only to the operator named at the foot of this page.