Mahdia — The Fatimid Capital on a Narrow Peninsula in Tunisia
Mahdia rises on a narrow rock peninsula on the central coast of Tunisia. The Fatimid dynasty built its first capital here in the tenth century.
The pages that follow describe the peninsula and its climate, the centuries from a Phoenician anchorage to an Ottoman fort, the practical business of getting here, and the places that define a visit. Mahdia rewards a slow pace: a traveller who gives the town two or three days will see the Fatimid gate, the Ottoman fort, the fishing port at dawn, and a long beach that stays quiet outside the summer months.
Quick Facts
- Name: Mahdia, Arabic al-Mahdiyah, meaning the city of al-Mahdi; older European names Africa and Aphrodisium.
- Position: Central coast of Tunisia, on a rock peninsula reaching east into the Mediterranean.
- Role: Capital of Mahdia governorate, one of the most important fishing ports in Tunisia, and the first Fatimid city.
- Population: 76,513 people on the 2022 figure.
- Distances: About 200 km south of Tunis, about 50 km south-east of Sousse, and about 50 km south of Monastir.
- Peninsula: About 1,400 m long and less than 500 m wide, with the medina at its eastern end.
- First capital: Building began in 916, the city opened on 20 February 921, and it stayed the Fatimid capital until 973.
- Sights: Skifa el-Kahla gate, Borj el-Kebir fort, the Great Mosque, the fishing port, the Mahdia museum, and a beach of about 10 km.
- Specialities: Fish and seafood from the port, traditional weaving, and dates from the Sahel.
- Nearest airport: Monastir, about 50 km to the north, with Tunis airport about 200 km away.
Geography of Mahdia
Mahdia sits on the central coast of Tunisia, on a rock peninsula about 1,400 m long and less than 500 m wide that reaches east into the Mediterranean. The shape of the peninsula decided the history of Mahdia: it made the town easy to defend from the land, easy to supply by sea, and hard to attack, which is why the Fatimids chose this place for their first capital. The medina takes up the eastern third of the peninsula, cut off from the mainland by a moat and a single gate, the Skifa el-Kahla, while the tip of the peninsula is Cap Africa, where the Borj el-Kebir fort looks out over the sea. The fishing port works on the northern side of the peninsula, and a beach of about 10 km runs south from the edge of the medina past the Zone Touristique resort area.
The shore around Mahdia has long sand and clear water, and the main beach runs from the medina southward through the resort zone toward small fishing villages. It counts among the longest beaches on the Tunisian coast, with fine white sand and shallow water that suits families with small children and visitors who want to swim. The fishing port on the northern side is where boats come in each morning and where canneries pack blue fish, one of the main industries of Mahdia. West of the peninsula lies the mainland part of the town, with newer housing, the market, and the main road that joins Mahdia to Monastir in the north and Sfax in the south.
The climate of Mahdia is Mediterranean, with hot dry summers, mild winters with some rain, and a sea wind that blows steadily through the year. Summer temperatures usually reach 28 to 33 degrees, and the sea stays warm from June to September, which sets a clear bathing season. Winter days run about 15 to 20 degrees, with little rain and a stronger sea wind, and many tourist businesses run at a slower pace. Rain over the year is low and falls mostly in winter, and the sea wind keeps the air from turning stifling even when the sun is fierce.
This weather makes Mahdia crowded in summer, when European visitors and Tunisians come for the beach, and much quieter in winter, when a visitor can have the medina and the fishing port almost alone. The town feels full from June to September, when the beach fills and the resort hotels run at capacity, and it feels empty in January and February, when the wind sharpens and the cafes keep shorter hours. The change of season is visible in the port too: the summer catch feeds the canneries at full pace, while the winter catch feeds the local market and the restaurants of the medina.
The position of Mahdia in central Tunisia makes it easy to reach from Tunis, Sousse and Monastir, by road and by the coastal railway that links these towns. The train from Tunis to Mahdia runs through Sousse and Monastir and takes about three to four hours, which suits travellers who do not want to drive. The road from Tunis is about 200 km and takes two and a half to three hours by bus or hire car.
The nearest airport is Monastir, about 50 km to the north, with flights to many European cities, while Tunis airport, about 200 km away, is the main air gateway of the country. From Mahdia the coastal road continues south to Sfax and on toward the island of Djerba, so the town works well as a stop on a longer journey down the coast.
The people of Mahdia live from the sea and from weaving, and these two trades still shape the town. The fishing port is one of the most important in Tunisia, with boats, processing sheds and export firms that employ many local families. Weaving, above all cloth and carpets, is an old tradition of Mahdia, with workshops inside the medina and shops selling fabric, carpets and traditional clothing. The modern town has grown around the peninsula and the resort zone, with hotels, restaurants and visitor services gathered along the southern beach, while the medina and the fishing port keep the rhythm of a traditional port town.

Mahdia, Tunisia January 2024 — CC BY 2
History of Mahdia
The history of Mahdia starts in antiquity, when this place was a small Phoenician and Roman anchorage on the headland of Cap Africa, a stop on the sea route along the north African coast. It never grew into a large city in those centuries, because the narrow peninsula held few people and offered little farmland. After the Arab conquest of North Africa in the seventh century, the new rulers chose Kairouan, an inland town, as their first capital in Tunisia, because they feared attack from the Byzantine fleet. The founding of Mahdia in the tenth century shows that fear had passed: the Arabs had taken Malta and Sicily, the sea was no longer a threat, and a coastal capital that was easy to defend and easy to supply had become possible.
In 916 Ubayd Allah al-Mahdi, the first caliph of the Fatimid dynasty, ordered a new capital built on the Mahdia peninsula, and he named the city after his own title, al-Mahdiyya, the city of al-Mahdi. Building began in 916 and the city opened formally on 20 February 921, although some works continued after that date. The Fatimids dug a moat about a kilometre long across the narrow neck of the peninsula and raised a single great gate, the Skifa el-Kahla, the Dark Gate, through which the whole city was entered and left.
The harbour of Mahdia was cut into solid rock, could hold 30 ships, and closed with a chain drawn between two towers at its mouth. From Mahdia the Fatimid caliphs ruled much of what is now North Africa, from Tunisia, Algeria and Morocco to Libya and Sicily, in the years from 921 to 969.
In 969 the Fatimids conquered Egypt, and in 973 they moved their capital to Cairo, the new city they had built in Egypt, and Mahdia began to lose its role as a capital. The town stayed a wealthy regional city until the fourteenth century, with a port, shipyards and trade, but it weakened slowly as trade routes shifted and timber grew scarce. In the sixteenth century the Ottomans built the Borj el-Kebir fort on the eastern tip of the peninsula, on the site of a ruined Fatimid arsenal, and the fort was finished in 1595. The fort became the new symbol of Mahdia, with a view over the port, the sea and the Mediterranean, while the town around it settled into the life of a small port.
In the centuries that followed, Mahdia became a small port town, and by the nineteenth century its population was only a few thousand, according to the accounts of European travellers. The medina kept its Fatimid street plan and its mosque, the port kept its fishing, and the town stayed quiet while other Tunisian ports grew. The walls of the Fatimid city mostly vanished, and the Skifa el-Kahla gate is all that survives of them, standing at the neck of the peninsula where the moat once ran.
In the twentieth century Mahdia grew again on fishing and tourism, with the port enlarged, canneries expanded, and the Zone Touristique built along the southern beach. The Mahdia museum gathers finds from the Punic, Roman, Islamic and Christian periods of the area, from the old port, the Fatimid city and the villages around it, and it helps visitors follow the long history of the region. The Great Mosque of Mahdia, built in 916 by Ubayd Allah al-Mahdi, is one of the oldest mosques in Tunisia, with an unusual design that has no minaret, and it remains the religious centre of the town. Today Mahdia is a quiet coastal city, with an old medina, a busy fishing port and a long beach, drawing visitors who want a Tunisia very different from the crowded resorts of Hammamet and Sousse.
The sea off Mahdia hid a famous wreck for two thousand years. In 1907 sponge fishermen found a Greek merchant ship that had sunk in the first century before Christ, loaded with Greek art bound for Rome, and its cargo included a bronze statue of a youth, marble columns and furniture, now kept in the Bardo Museum in Tunis. The wreck shows that the anchorage of Mahdia served the trade of the whole Mediterranean long before the Fatimids built their capital on the peninsula.

Statue d’espadon (swordfish statue) — CC BY 2
Travel to Mahdia
Visitors come to Mahdia mainly for the beach and for Fatimid history, and they should allow at least two or three days for the town and its surroundings. The first day belongs to the medina and the peninsula, with the morning at the Skifa el-Kahla gate, the Great Mosque and the lanes of the medina, and the afternoon at the Borj el-Kebir fort and the fishing port. The second day suits the beach, with a morning swim and an afternoon walk along the shore to the Zone Touristique.
A third day can go to the Mahdia museum and a day trip to Monastir or Sousse, about an hour each way. Travellers short of time should put the medina and the fort first, because those two places show the Fatimid character of Mahdia most clearly.
Getting to Mahdia is easiest by road or rail from Tunis, Sousse and Monastir. Buses and coaches from Tunis take about three hours for the 200 km, running through Sousse and Monastir along the coast. The train from Tunis also takes about three to four hours, and Mahdia station stands near the town centre, which suits travellers who do not want to drive.
The nearest airport is Monastir, about 50 km to the north, and taxis and buses link the airport with Mahdia in about an hour. Inside the town, walking is the main way to move, because the medina and the peninsula are small, and taxis are available for the southern beach and the resort zone.
Places to stay in Mahdia gather along the southern beach and the Zone Touristique, with large hotels, resorts and family guesthouses, many with a private beach and a pool. The medina and the fishing port hold smaller guesthouses and boutique hotels, with sea views and a local atmosphere, for visitors who want the life of the port town. Travellers should book ahead if they come in the high season, from June to September, when the beach hotels fill fast, above all during Tunisian and European holiday periods. Outside summer, Mahdia is much quieter, room prices fall, and visitors can often find a room on arrival.
The food of Mahdia comes from the sea, with fresh fish and seafood from the port, above all blue fish, which is processed and canned in the town itself. Restaurants around the fishing port and the medina serve grilled fish, prawns, squid and traditional Tunisian dishes such as couscous, brik and mechouia salad. The central market is the best place to buy dried fish, spices, textiles and crafts, with stalls selling everything from canned fish to carpets and traditional clothing.
The port restaurants grill the morning catch over charcoal, and the canneries behind the harbour pack blue fish for export across Tunisia. In the medina, the cafes serve mint tea beside plates of brik and mechouia salad, and the market stalls sell dried fish, spices and woven cloth.
May to October is the beach season in Mahdia, when the sea is warm enough to swim and the hotels along the southern beach run at full pace, so rooms should be booked ahead for June, July and August. October keeps a warm sea with a quieter medina, and May offers the same calm before the summer crowds arrive. From November to March the beach empties and the wind off the sea sharpens, but the fishing port works through the winter and the medina is at its most local.
Notable Places in Mahdia
Skifa el-Kahla Gate
The Skifa el-Kahla, the Dark Gate, is the only gate of the Fatimid city of Mahdia, standing at the narrow neck of the peninsula where a moat about a kilometre long once cut the city off from the mainland. Built between 916 and 921, it has a long dark vaulted passage with trapdoors and heavy doors, and it was the single line of defence for the whole city. Today the gate is the symbol of Mahdia, with a view from the top over the medina, the fishing port and the sea, and it is the first stop for visitors entering the medina from the mainland.
Borj el-Kebir Fort
Borj el-Kebir, the Great Fort, stands on the eastern tip of the peninsula at Cap Africa, with a view over the port, the sea and the Mediterranean. The Ottomans built it in 1595 on the site of a ruined Fatimid arsenal, with vaulted corridors, a courtyard and Roman columns still standing inside. Late afternoon is the finest time to visit, when the low sun turns the sea and the town warm gold, and the fort stays open daily with longer hours in summer.
Great Mosque of Mahdia
The Great Mosque of Mahdia was built in 916 by Ubayd Allah al-Mahdi and is one of the oldest mosques in Tunisia, with an unusual design that has no minaret, unlike most other mosques in the country. It stands in the centre of the medina, with a courtyard, stone columns and domes, and it has been the religious centre of the town since Mahdia was founded. Visitors who are not Muslim can admire the mosque from outside and from the courtyard, but they should respect its rules and avoid entering during services, and a visit here pairs well with the Skifa el-Kahla gate and the Borj el-Kebir fort.
Fishing Port of Mahdia
The fishing port of Mahdia is one of the most important fishing ports in Tunisia, on the northern side of the peninsula, with fishing boats, processing sheds and a morning fish market. Visitors who come early in the morning see the boats land, the fishermen sort the catch, and the canneries pack blue fish, one of the main industries of Mahdia. The port also shows the daily life of the town, with local people buying fresh fish, restaurants choosing fish for lunch, and children playing around the harbour, while the afternoon brings a quieter scene of moored boats and fishermen mending nets.
Mahdia Museum
The Mahdia museum shows finds from the Punic, Roman, Islamic and Christian periods of the area, with objects from the old port, the Fatimid city and the villages around it. Its rooms cover the history of Mahdia from antiquity to the modern age, with pottery, jewellery, coins and archaeological finds. The museum is small but well arranged, and it makes a good stop after the medina and the fort, above all at midday in the summer heat, when an hour inside is welcome.
Mahdia Beach and the Zone Touristique
The beach of Mahdia runs about 10 km from the edge of the medina southward through the Zone Touristique, with fine white sand and clear water, and it counts among the longest beaches on the Tunisian coast. It suits families with small children, with shallow calm water and more facilities than a wild beach, including sun loungers, umbrellas and beach restaurants. Late afternoon is the best time to walk along the beach, when the low sun lights the sea and visitors can watch the sunset over the Mediterranean, and a bottle of water and sunscreen are worth carrying in summer.
Frequently Asked Questions
Where is Mahdia?
Mahdia stands on the central Tunisian coast, about 200 km south of Tunis and 50 km south-east of Sousse, on a narrow rock peninsula.
What makes a Mahdia holiday special?
A Mahdia holiday joins a long beach with Fatimid history, a working fishing port, and a slow pace far from the big resorts.
Which sights should I not miss in Mahdia?
Do not miss the Skifa el-Kahla gate, the Borj el-Kebir fort, the Great Mosque, the fishing port, the museum, and the beach.
How do I get from Tunis to Mahdia?
Take a bus, train or hire car south along the coast, about three hours for the 200 km, passing through Sousse and Monastir.
When is the best time to visit Mahdia?
May to October brings warm seas and open services, with May and October the quietest warm months and June to August the busiest.
Where can I go for a day from Mahdia?
Monastir and Sousse each lie about an hour away by bus or train, and Kairouan makes a longer day trip inland.
Verified
- Q466054 is Mahdia, a municipality of Tunisia and an imada, at 35.5047 degrees north and 11.0622 degrees east, matching the registry — Wikidata API, checked 23 November 2026.
- Building began in 916, the city opened on 20 February 921, and it stayed the Fatimid capital until 973, when the court moved to Cairo — Wikipedia, checked 19 November 2026.
- The harbour of Mahdia was cut into solid rock, could hold 30 ships, and closed with a chain drawn between two towers at its mouth — Wikipedia, checked 19 November 2026.
- Borj el-Kebir was built by the Ottomans in 1595 on the site of a ruined Fatimid arsenal, and the Great Mosque of 916 has no minaret — travel guides, checked 19 November 2026.
- The nearest inscribed property is the Amphitheatre of El Jem, ref 38, inscribed in 1979 under criteria (iv) and (vi), about 39.8 km from Mahdia in a straight line; the amphitheatre was built around 238 AD, measures 148 by 122 m, and held about 35,000 spectators — whc.unesco.org/en/list/38/, checked 23 November 2026.
- The older claim that Skifa el-Kahla is one of only two surviving Fatimid gates in the world is wrong: Cairo alone keeps three, Bab Zuwayla of 1092 and Bab al-Futuh and Bab al-Nasr of 1087, and Skifa is one of the few remnants of the walls of Mahdia — checked 23 November 2026.
- Cap Africa is not the easternmost point of Tunisia: the coast where the Libyan border meets the sea reaches about 11.57 degrees east, further east than Mahdia at 11.06 degrees — checked 23 November 2026.
Sources
- Mahdia on Wikipedia (https://en.wikipedia.org/wiki/Mahdia) — population 2022, building 916, opening 921, Fatimid capital to 973, harbour of 30 ships; checked 19 November 2026.
- Mahdia on Carthage Magazine (https://carthagemagazine.com/mahdia-travel-guide/) — peninsula, Skifa el-Kahla, Borj el-Kebir 1595, Cap Africa; checked 19 November 2026.
- Mahdia on Euromed (https://www.reseau-euromed.org/en/ville-membre/mahdia-2/) — peninsula 1,400 m, Skifa Kahla, Borj el-Kebir 1595, mosque without minaret; checked 19 November 2026.
- Amphitheatre of El Jem on UNESCO (https://whc.unesco.org/en/list/38/) — ref 38, inscribed 1979, criteria (iv) and (vi); checked 23 November 2026.
Unverified
- The peninsula is given as about 1,400 m in one source and about 2 km in another, and this article follows the shorter figure.
- One source dates the move of the Fatimid capital to Cairo as 923 rather than 973, while 973 is the year most histories accept.
- The beach is commonly described as about 10 km long, but no official survey figure has been found for it.
- Opening hours and entry fees for Borj el-Kebir change with the season and were not verified on an official site, so this article gives no figures for them.
Illustrations
- Hero: Mahdia. Free image: https://upload.wikimedia.org/wikipedia/commons/0/05/Fuerte_Bordj_el_Kebir%2C_Mahdia%2C_T%C3%BAnez%2C_2016-09-03%2C_DD_34-36_HDR.jpg — CC BY-SA 4.
- In body, Mahdia: Mahdia, Tunisia January 2024. Free image: https://upload.wikimedia.org/wikipedia/commons/4/4d/Mahdia%2C_Tunisia_January_2024_-_Avenue.jpg — CC BY 2.
- In body, Mahdia: Statue d’espadon (swordfish statue). Free image: https://upload.wikimedia.org/wikipedia/commons/9/97/Mahdia%2C_Tunisia_January_2024_-_Roundabout.jpg — CC BY 2.
