The M'zab Valley is one of the most extraordinary places in Algeria and the entire Sahara. Its five fortified oasis towns were built a thousand years ago on rocky outcrops, with ochre houses stacked in a pyramid around a fortress-mosque. They were built by the Mozabites, an Ibadi community following a branch of Islam distinct from both Sunni and Shia. They sought refuge in this stony desert to live out their faith simply, and they have kept their way of life almost unchanged for ten centuries.
Ghardaïa, the largest of the five, wins you over with its arcaded market square, its maze of alleys and its pyramid-shaped skyline topped by the minaret of the Great Mosque. Beni Isguen, the holy town, is closed and fiercely protective of its traditions, and it offers one of the most fascinating scenes in the valley: its late-afternoon auction under the arcades. El Atteuf, the oldest town, is home to the Sidi Brahim mosque, whose pure forms inspired none other than Le Corbusier, the father of modern architecture.
This guide takes a practical look at Ghardaïa and the M'zab. It covers what to see in each town, how to visit Beni Isguen with a guide and which rules to respect in these conservative communities. It also explains where to buy the famous M'zab carpets and how to get around the valley. It's a journey to the heart of a thousand-year-old culture, in one of the least-known gems on the World Heritage list.
From the 11th century onwards, the M'zab Valley was settled by the Ibadis, a persecuted Muslim community. After the fall of their kingdom of Tahert, they took refuge in this stony desert to practise their faith in peace. Between 1012 and 1350 they founded the five fortified oasis towns of the M'zab: Ghardaïa, Beni Isguen, Melika, Bounoura and El Atteuf. Their town planning was practical, community-based and perfectly adapted to the desert. It survives almost intact, and UNESCO declared it a World Heritage Site in 1982. The full story is on our history page.
Read the full history ↓The threshold of the Algerian Sahara: the M’zab valley, with its five fortified oasis-cities built by the Ibadis a thousand years ago and admired by Le Corbusier, and Timimoun, the “red oasis” of the Grand Erg Occidental.
Read the history of The gateways to the desert →No exact prices: a scale from $ (budget) to $$$$$ (luxury), with 2-3 options per category.
Origins, formation and what the sources say.
To understand the M'zab, you have to go back to the first centuries of Islam. After the death of the Prophet Muhammad, the Muslim world split over the question of who should lead the community. Out of those disputes came, among other movements, Ibadism, a branch of Islam distinct from both Sunni and Shia Islam. It is considered the oldest of the independent schools and is known for its moral rigour, its austerity and its ideal of an egalitarian, devout community of believers.
In the 8th century the Ibadis managed to found a state in North Africa, the Rustamid imamate, with its capital at Tahert (present-day Tiaret, in north-western Algeria). For more than a century Tahert was a thriving centre of trade, learning and tolerance. But in 909 the city fell to the Shia Fatimids, and the Ibadi community was scattered and persecuted. It had to find a new refuge where it could practise its faith in peace.
They found that refuge in one of the most inhospitable places imaginable: the stony, arid valley of the Wadi M'zab, deep in the northern Sahara. The harsh environment drove others away, and that made it their best protection. There, far from the powers that threatened them, the Ibadis set out to build a new civilisation from scratch.
Between the 11th and 14th centuries, the Ibadis founded a group of fortified oasis cities in the M'zab Valley, known as the M'zab Pentapolis. According to tradition and to UNESCO, their ksour were built between 1012 and 1350. The oldest is El Atteuf (Tajnint), followed by Bounoura, Melika, Beni Isguen and Ghardaïa (Taghardait), which went on to become the largest and most important.
Each city was built on a rocky outcrop, with the houses stacked in a pyramid around the mosque. Its minaret crowns the highest point and also served as a watchtower. The market square and the palm groves lay at the foot of the hill or on the outskirts. This urban model was compact, defensive, practical and built around the community. It met the needs of defence, coped with the extreme climate and reflected the community's religious and social values.
The achievement was not only architectural but hydraulic too. In a desert where it hardly ever rains, the Mozabites devised an ingenious system for catching, storing and fairly sharing the water from the wadi's rare floods, using dams, channels, wells and precise community rules. Thanks to this system they were able to create the palm groves that made life possible. That urban planning and water management, preserved for centuries, are the reason the M'zab is a World Heritage Site today.
The people of the M'zab, the Mozabites, developed a deeply original society governed by Ibadi principles. It is a close-knit, well-organised community in which religion, overseen by councils of scholars and clerics, shapes much of daily life. Their own language, Mozabite (Tumzabt, an Amazigh language), and their austere, conservative customs have helped them keep their identity in the face of the outside world.
The Mozabites are famous for their flair for trade. Because their land was so poor, many men moved for periods to the cities of northern Algeria to work as merchants. They sent money home to their families and then returned to the valley. Mozabite traders became a byword across the country for honesty and hard work. That trading network was key to the prosperity of the oasis cities, which always distrusted luxury and waste.
The social organisation of the M'zab has drawn the attention of scholars from all over the world: water and land shared by the community, an egalitarian urban layout and strong religious control. It is a remarkable example of how a community managed to build and keep up a coherent, sustainable way of life for a thousand years in one of the harshest environments on the planet.
In the 20th century the M'zab went from being an overlooked corner of the world to a reference point for modern architecture and urban planning. Much of the credit for this change goes to the Swiss-French architect Le Corbusier, one of the fathers of 20th-century architecture. He visited the valley in the 1930s and was dazzled by what he saw.
Le Corbusier was fascinated by the purity of Mozabite forms and by the wisdom of an urban plan perfectly suited to the climate and to community life. He also admired the economy of means and the sober beauty of the mosques and houses. In the M'zab he saw a lesson in practical, human architecture that closely matched his own ideas. That experience is thought to have influenced his later work, and the Sidi Brahim mosque in El Atteuf is often linked to the forms of his famous chapel at Ronchamp.
Thanks to this new appreciation, the M'zab began to be studied and protected as an exceptional heritage site. In 1982 UNESCO added the valley to the World Heritage List, recognising the universal value of its five cities, its earthen architecture and its water system. What had begun as a refuge for a persecuted community was now a treasure of humanity.
A thousand years after its founding, the M'zab Valley is still alive and still home to the community that created it. The five cities keep running according to their traditional organisation, with their markets, mosques, palm groves and community-managed water. The Mozabites still keep their language, their Ibadi faith and many of their customs, making the valley one of the world's most remarkable examples of cultural continuity.
That survival, however, sits alongside the challenges of the present. Population growth, modern building around the old ksour and pressure on water and other resources all test the valley's delicate balance. So do social tensions: in 2013 and 2015 there were serious clashes between the region's Mozabite (Ibadi) and Arab (Chaamba) communities. Preserving the M'zab's tangible and intangible heritage without freezing its people's lives is a constant challenge.
For travellers, the M'zab offers something unique: a glimpse of a thousand-year-old civilisation that is not a museum but a living community. Exploring Ghardaïa, Beni Isguen, El Atteuf and the other cities respectfully is one of the great privileges Algeria has to offer. Understanding their faith and history and admiring their architecture and water engineering is also one of the finest lessons in how people can thrive in harmony with an extreme environment.