The M'Zab Valley is a group of five fortified towns on rocky hills above a dry riverbed in the northern Sahara, about 600 km south of Algiers. You explore the old centers on foot; Beni Isguen, the strictest of the five, lets you in only with a local guide, whom you hire at the gate.
This guide covers how the towns were built, the rules to know before you go, the markets and the Beni Isguen auction, and when to visit. The easiest base is a family guesthouse in the Beni Isguen palm grove, a short hop from all five towns; our travel guide for Algeria covers them.
The pentapolis: the five towns of the M'Zab Valley
The five hilltop towns along the Oued M'Zab are known together as the pentapolis. They were built by the Mozabites, a Berber-speaking people who follow the Ibadi school of Islam. Ibadi communities moved south after their Rustamid state at Tahert fell in 909, and they settled this dry, remote valley, where they could live by their own rules. UNESCO added the valley to its World Heritage list in 1982.
All five towns are still lived in. That is what makes a visit here different from a Roman site: you walk through residential lanes, past people's front doors, under rules the community sets.
When the five ksour were founded
Each town is a ksar (plural ksour), a fortified village built of local stone bound and plastered with lime and gypsum, with palm trunks for beams. The oldest is El Atteuf, founded in about 1012.
Bou Noura and Ghardaïa followed in the mid-11th century. Beni Isguen and Melika came later (sources disagree on their dates), and all five were in place by about 1350. Ghardaïa grew into the largest and is now the capital of its wilaya.
Each ksar sits on its own rocky outcrop, which kept the houses above the floods and left the valley floor for the palm gardens. Two more towns further out, Berriane and Guerrara, date from the 17th century.
How Ibadi society is organized
Each town has traditionally been run by the halqa of the azzaba, a council of religious scholars that meets in the mosque and decides on religious and community matters. A women's council deals with women's affairs. The most visible sign of how traditional the valley still is: women outside the home wear the ahouli, a white haïk that covers everything but one eye.
This explains most of what you'll run into as a visitor. Some quarters are closed to outsiders, photos of people are not welcome, and the rules are kept by the community, not by a ticket office.
The Mozabites are also a living community, not a historical one. Their language, Tumzabt, is a Berber language spoken by about 200,000 people (2022 estimate), alongside Arabic and French. Ghardaïa wilaya had about 392,000 inhabitants in 2020. Mozabite families have long run shops and trading businesses in towns across northern Algeria while keeping their homes and councils in the valley.
The five towns one by one
| Town | Founded | Known for | Guide |
|---|---|---|---|
| El Atteuf | About 1012, the oldest | The Sidi Brahim mosque | Recommended |
| Bou Noura | Mid-11th century | A partly ruined upper town | Recommended |
| Ghardaïa | Mid-11th century | The market square; the largest town | Recommended |
| Beni Isguen | Later (sources differ) | Strict rules, the Boulila tower, the daily auction | Compulsory, hired at the gate |
| Melika | Later (sources differ) | A small hilltop town and the Sidi Aïssa cemetery | Recommended |
Ghardaïa
The largest of the five and the capital of the wilaya. Climb from the arcaded market square through the lanes to the mosque at the top for the view over the valley. The new town around it has the hotels, banks and restaurants.
Beni Isguen
The most religious and the most closed of the towns, entered only with a guide from the gate. Its highest point is the Boulila tower, and the auction on Place Lalla Achou runs every day except Friday (more on both below).
Melika
A small town on the hill facing Ghardaïa, the only ksar in the valley that never spread beyond its first walls. It was the valley's holy town until the 19th century, and its cemetery, with the tombs of the saint Sidi Aïssa and his family, is a protected area.
Bou Noura
The name means "the luminous one". The first town on the hilltop was destroyed in the mid-13th century and is partly in ruins, though its mosque and walls have been restored. People now live in the lower town, rebuilt nearer the riverbed.
El Atteuf
The oldest of the five, founded in about 1012. Its 15th-century Sidi Brahim mosque is usually cited as an inspiration for Le Corbusier's chapel at Ronchamp. Look at the plain, rounded volumes and the way light falls through small openings. In Ghardaïa itself, Fernand Pouillon's Hôtel M'Zab, finished in 1970, picks up the same plain local forms.
M'Zab architecture: how the towns are built
The towns were built for defense and for the heat, with what the valley had: stone, lime and gypsum plaster, and palm wood. Houses are packed so tightly that each one shades its neighbors.
The mosque at the top of each town
Every ksar has its mosque at the summit. The minaret, a plain square tower that tapers as it rises, also served the town as a watchtower. There are no mosaics or glazed tiles; the bare, whitewashed walls follow the Ibadi preference for plainness. Non-Muslims are generally not allowed inside, so you see the mosques from the lanes around them.
UNESCO describes the mosque as the town's fortress, the last place to hold out in a siege, with an arsenal and a grain store. The houses spread downhill from it in rings, out to the town wall.
Narrow lanes and courtyard houses
The lanes that run down from the mosque are narrow and winding, between high walls with few openings, and some are covered over. They stay in shade for most of the day and hold the cool night air into the morning, which is the best time to walk them.
Each house faces inward, around a central courtyard lit by an opening in the roof. The ground floor has few or no windows onto the street, which keeps out heat, dust and passers-by's eyes, and families sleep on the roof terrace on summer nights.
Rules for visitors to the M'Zab Valley
The old towns are residential, religious communities, so visits run on local rules. Beni Isguen is the strictest. Ghardaïa, Melika, Bou Noura and El Atteuf are more relaxed, but the same courtesy applies everywhere.
Local guides: where you need one
In Beni Isguen a guide is compulsory. You hire one at the guides' office by the main gate and you can't walk in alone; the town closes to visitors at sunset, and non-residents may not sleep inside the walls. In the other ksour a guide isn't always required, but we'd still take one. The lanes are a maze, some areas are private, and a guide knows where you can go and when prayer times make it better to wait.
A guide also points out what you would otherwise walk past: how the quarters are divided, how a house is laid out inside, and where the old walls and watchtowers stand.
Photography and dress
Don't photograph residents, especially women, in any of the ksour. Some areas are off-limits for photos altogether, so ask your guide before you point a camera at a doorway, a shop or a square. Leave the drone at home: Algerian customs confiscates drones brought in without an authorization that tourists can't realistically get.
Dress modestly: shoulders and knees covered for everyone, loose clothing, and long trousers rather than shorts for men. Smoking is banned inside the walls of Beni Isguen, music doesn't belong in the lanes, and you won't find alcohol in the old towns.
How the oasis gets its water
Below the towns, the palm groves survive in a valley where it rarely rains. They live on the occasional floods that come down the wadis, and on wells that those floods refill.
Flood dams, channels and wells
The Mozabites built diversion dams across the wadis to slow each flood and share it out. The best known is the Beni Isguen dam, upstream of the ksar, where a stone weir and sliding gates send the water into channels (seguias) that reach each garden in agreed shares. What the gardens don't take soaks into the ground and recharges the water table that feeds the wells; the old wells were worked by animals hauling up a bucket on a rope.
Flood trustees chosen by the community, the oumana, oversee the sharing. These are not foggaras: the underground foggara channels belong to the Gourara, Touat and Tidikelt oases much further south.
None of it is automatic. The gates are worked by hand, and the system only comes into play on the few days a flood arrives. When the floods do come they can be violent, which is one reason the towns were built on rocky outcrops above the riverbed.
Summer houses in the palm groves
Summers are hot, with daytime highs around 40°C in July. Many Mozabite families traditionally left the towns for the hottest months and moved to second homes in the palm groves.
Under the palms it is noticeably cooler. The gardens are farmed in layers: date palms shade fruit trees such as pomegranates and figs, which shade vegetables and fodder below. A walk through them with your guide, best in the late afternoon, is the easy green break from the stone towns.
Markets in Ghardaïa and Beni Isguen
Ghardaïa's arcaded market square, at the foot of the old town, has been the valley's trading place for centuries. Expect spices, dates, household goods and stacks of carpets and blankets. Prices are rarely marked, bargaining is normal, and almost everyone wants cash. The Great Mosque and the best places to stay in town are covered in our list of Ghardaïa's main attractions.
Buying M'Zab carpets and crafts
The valley is best known for wool carpets and blankets, woven by women, often in natural wool colors with geometric patterns. Ask whether a piece is handwoven and local, and turn it over: a handmade carpet shows the same pattern on the back, small irregularities included. Ghardaïa's carpet festival, usually held in March, is the time to see the most weaving in one place.
You'll also find leather goods, brass and copperware, and silver jewelry. If you want to buy from the people who make things, ask your guide which workshops to visit.
The Beni Isguen auction
Every day except Friday, after the afternoon prayer, Beni Isguen holds a public auction on Place Lalla Achou, its market square. People bring secondhand furniture, carpets, household goods and used clothing, and auctioneers approved by the town's council of clerics carry the items around the square, calling out the bids.
The sale is quiet and orderly, and it ends shortly before sunset, when the town closes to visitors. Come with your guide, watch from the edge of the square and keep your camera off the people. Watching costs nothing.
Where to stay and what to eat
The valley is not set up for mass tourism. Hotels are few and mostly in Ghardaïa's new town, guesthouses are small and meals are simple. The two classic hotels in Ghardaïa, Hôtel M'Zab and El Djanoub, were both designed by the French architect Fernand Pouillon.
Staying in a guesthouse in the palm grove
Non-residents can't sleep inside Beni Isguen, so the closest you can get is a guesthouse in the palm groves around it.
The better ones are old houses restored in the local style, with a central courtyard, palm-trunk beams and thick walls. Expect simple rooms, home-cooked dinners and payment in cash, and don't count on finding them on international booking sites.
The thick walls keep the rooms cool at night, and the paths through the gardens start at the door. For a night in the dunes instead, see our page on luxury desert camps in Algeria.
Food in the M'Zab
Cooking here is home cooking, built on grains, dates and slow-cooked meat. Couscous with lamb, vegetables and a bowl of broth is the dish of family meals and Fridays.
In winter, look for berkoukes, a large-grain, hand-rolled couscous cooked in a soupy, spiced sauce with meat and vegetables. Meals end with sweet green tea, usually with mint, and dates from the palm groves. Restaurants are basic and mostly in Ghardaïa's new town, so for a Mozabite home meal, ask your guesthouse or guide in advance whether a dinner with a family can be arranged.
The M'Zab in practice
- Where: Ghardaïa wilaya in the northern Sahara, about 600 km south of Algiers.
- Getting there: a flight to Ghardaïa (about 1 h 15 from Algiers), or 7 to 8 hours by road on the RN1.
- Time: two or three nights.
- Season: October to April, with the carpet festival each spring.
- Guides: compulsory in Beni Isguen and hired at the gate; a good idea in the other four towns.
- House rules: modest dress, no photos of people, no smoking in Beni Isguen.
- Visa: from a consulate in advance, or on arrival if an approved agency organizes your tour.
Planning your trip to the M'Zab Valley
Ghardaïa is about 600 km south of Algiers. The quickest way in is by air. Air Algérie flies to Noumérat-Moufdi Zakaria airport, named after the poet who wrote the national anthem, in about 1 h 15 from Algiers, and also from Oran and Constantine. The airport is about 15 to 20 km from town, and your guesthouse or agency can send a car. By road it's 7 to 8 hours on the RN1, through Djelfa and Laghouat, and long-distance buses make the same run.
Ghardaïa counts as one of the 24 southern wilayas, so an organized tour booked through an approved Algerian agency can get you the visa on arrival; otherwise, like most Western visitors, you arrange the visa in advance. If you plan to continue deeper into the desert, our overview of the Algerian Sahara compares Djanet, the Hoggar and Timimoun.
A two-day plan
- Day 1: Ghardaïa's old town and market square in the morning; Melika in the afternoon; the view over the valley from a high terrace at sunset.
- Day 2: Beni Isguen with a gate guide in the cool of the morning; the palm grove and the dam walk after lunch; El Atteuf; back to Beni Isguen for the auction before sunset.
- Day 3 (optional): Bou Noura's upper town and a visit to a carpet weaver or craft workshop.
When to go and what to pack
Go between October and April, when it's comfortable to climb the steep, unshaded streets of the hilltop towns. We'd pick March, when the carpet festival is usually on. Avoid June to September if you can: with highs around 40°C in July, midday walking is hard work. Wear closed shoes with a good grip for the worn stone steps and the dirt paths of the palm groves.
Nights from December to February are cold, so bring a warm layer, plus a hat and sunglasses for the glare and a refillable water bottle. If you have extra days, Taghit and its giant dunes make a good second desert stop.
Visiting the M'Zab: practical questions
What is the M'Zab Valley known for? For five fortified hilltop towns built by the Ibadi Mozabites between about 1012 and 1350, each with its mosque at the top and houses in rings below. UNESCO listed the valley in 1982 because the towns, built for the desert climate and still lived in, kept their original plan and way of life. It is also known for wool carpets.
Can tourists visit Beni Isguen? Yes, as long as a local guide takes you in; the guides' office is by the main gate. Visitors leave at sunset and non-residents can't sleep inside. The afternoon auction on Place Lalla Achou is the best time to come.
How do I get from Algiers to Ghardaïa? Fly: Air Algérie reaches Ghardaïa's Noumérat airport in about 1 h 15, and the airport is 15 to 20 km from town. By road it's about 600 km on the RN1 through Djelfa and Laghouat, 7 to 8 hours by car or long-distance bus. A driver from the airport is the easiest way to reach a palm-grove guesthouse.
What language do the Mozabites speak? Tumzabt, a Berber (Tamazight) language spoken by about 200,000 people; most also speak Arabic, many speak French, and English is rare.
Who the M'Zab Valley suits
The M'Zab suits travelers interested in architecture, Islamic history and towns that still run on their own traditions, and who don't mind guides, dress rules and quiet evenings. It's a poor fit if you want nightlife, a drink with dinner or the freedom to photograph whatever you like.
If you want to see more of the Sahara by road, our Algeria desert road trip takes in Taghit, Timimoun and the Tassili. For the visa paperwork, a Mozabite guide, a heritage guesthouse and an airport driver, tell us when you plan to travel.