Matmata looks like another planet, and in a way it is: here, in the arid hills of southern Tunisia, the Berbers came up with a unique form of housing centuries ago, digging their homes underground to protect themselves from the scorching heat and the cold desert nights. The result is a surreal landscape of craters and galleries: large circular pits dug into the ochre earth, around which open the rooms, kitchens and stables of the troglodyte houses, invisible from the surface until you peer over the edge.
That otherworldly look is exactly what led George Lucas to film Star Wars here: one of Matmata's troglodyte houses, the Hotel Sidi Driss, served as Luke Skywalker's home on the planet Tatooine in the original 1977 film, and was used again in the prequels. Since then, the village has become a place of pilgrimage for fans of the saga, who can sleep and have a drink in the very dining room of the Lars homestead.
But Matmata is much more than a film set: it is a living testament to Berber culture and to an ingenious adaptation to the desert. This guide explores the village with a practical eye: how to visit the troglodyte houses (some still inhabited), what to expect from the Hotel Sidi Driss, how to get there from Gabès or Djerba, which neighbouring Berber villages are worth discovering and when to go. Whether you come for Star Wars, for the ethnography or for the lunar landscape, Matmata is one of the most singular experiences in all of Tunisia.
Matmata is a Berber village whose troglodyte houses are an ingenious response to the extreme climate of southern Tunisia: dug underground, they keep a stable temperature, cool in summer and mild in winter, and protect against sun, wind and sand. Local tradition traces these dwellings back centuries; one legend says the inhabitants dug their houses to hide, and some link their way of life to the resistance of Berber populations who took refuge in remote inland areas after successive invasions (Roman, Arab). For generations, entire families lived in these houses dug around sunken courtyards, devoted to farming and herding. In 1969, exceptional torrential rains damaged many homes and the authorities built a new village above ground (New Matmata), although many residents kept preferring their underground houses. International fame arrived in 1976, when scenes from Star Wars were filmed here, turning Matmata into a tourist destination. The full story is on our history page.
Read the full history ↓Saharan and Berber Tunisia: the island of Djerba with the oldest synagogue in Africa, the palm oases of Tozeur, the troglodyte houses of Matmata that served as a Star Wars set, and the immense salt lake of Chott el Djerid.
Read the history of The south, the desert and Djerba →Some places make no sense on your own; with someone explaining them, they change completely. We look ours up on Civitatis: guided in Spanish and booked online with no fuss. They have 17 activities in Djerba. And there are free tours here: you book without paying and tip the guide whatever you think at the end, so trying one costs you nothing. Three are below so you get the idea: tap any of them and they all open.
They depart from Djerba, 90 km away. If you book from this link we earn a commission and you pay no more.
No exact prices: a scale from $ (budget) to $$$$$ (luxury), with 2-3 options per category.
Origins, formation and what the sources say.
The history of Matmata is the history of the Berbers, or Amazigh, the oldest inhabitants of North Africa, who were living in the region long before the Phoenicians, Romans and Arabs arrived. Over the centuries, wave after wave of conquerors (Carthaginians, Romans, Vandals, Byzantines and finally the Arabs from the 7th century onwards) took control of the plains and coasts of what is now Tunisia. To keep their independence, their language and their way of life, many Berber communities withdrew to the most remote and rugged areas: the inland mountains and the edges of the southern desert.
During that retreat, the arid hills around Matmata, on the edge of the great desert, became a refuge. The harsh, hard-to-reach terrain protected people from armies and raids, and it let the Berber tribes keep their autonomy. The word 'Matmata' itself comes from one of these tribes. There they built a culture suited to scarcity and isolation, based on dry farming, raising goats and sheep, and saving every drop of rainwater with terraces and small dams.
For centuries, this Berber population kept its own language (Tamazight, still spoken in Matmata and in nearby villages such as Tamezret), its customs and its own social organisation. The environment was harsh. Summers topped 40 °C, nights were cold, and water and wood were scarce, so survival called for clever solutions. That need, and the know-how built up over generations, produced the type of home that would make Matmata famous: the troglodyte house dug into the ground.
The great contribution of Matmata's Berbers to the history of vernacular architecture is the underground home. It was a brilliant answer to an extreme climate and to a lack of building materials such as timber or good-quality stone. Instead of putting houses up on the ground, they dug their homes into the earth. The method is as simple as it is effective. First a large vertical pit, round or square and several metres deep and wide, is dug to serve as a sunken courtyard. Then the rooms are dug sideways into the walls of the pit. These bedrooms, kitchens, grain and oil stores and stables are like caves opening onto the central courtyard.
The main advantage is the temperature. The earth is a remarkable natural insulator, so the temperature inside the houses stays steady all year round. It is cool in the scorching desert summers and mild on freezing winter nights, so no scarce resources are spent on heating or cooling. The homes are also sheltered from the relentless sun, the sand-laden wind and storms. From the surface they are barely visible, which in the past also gave them some protection and privacy.
Houses were often linked by tunnels, and a family might have several pit courtyards depending on its size and wealth. All of domestic life took place around the courtyards: grinding grain, baking bread in the embers, storing the harvest, looking after the animals. This way of living, handed down through the generations, made Matmata a unique place where a whole village really did live underground. It was invisible in a landscape that looks uninhabited and, at first sight, like another planet.
For centuries, troglodyte life in Matmata changed very little and was left out of the great currents of history. In 1969, however, something happened that marked a turning point. That year, exceptional torrential rains fell on southern Tunisia for days, with an intensity extremely rare in such a dry region. The underground houses were not built to cope with that much water. Many of them flooded, their earth walls softened and collapsed, and the damage was severe. It was a catastrophe for the community.
In response, the Tunisian authorities decided to build a new village on the surface, known as New Matmata, with conventional houses and modern services and facilities to rehouse the people affected. New roads gave the area better links with Gabès and the rest of the country. The aim was to modernise community life and protect it from future disasters.
However, many residents did not want to leave their troglodyte homes. They rebuilt the damaged houses and kept choosing life underground. To them, the comfortable temperature, the tradition and their ties to an ancestral way of life mattered more than the new surface houses, which were hotter in summer and colder in winter. Matmata was split in two: the new village on the surface and the old troglodyte settlement scattered across the hills, still partly inhabited. That mix of the modern and the ancestral still defines the place today.
Matmata's international fame came in the most unexpected way: through the cinema. In the mid-1970s, American director George Lucas was looking for otherworldly locations to film the outdoor scenes of the desert planet Tatooine for his film Star Wars. Southern Tunisia, with its surreal landscapes, was perfect, and the crew arrived in the region in 1976. One of Matmata's troglodyte houses was chosen as the interior of the Lars family home, the farm where the hero, Luke Skywalker, grew up. That house is now the Hotel Sidi Driss.
The film came out in 1977 and became a worldwide phenomenon, and those images of the troglodyte house stayed in the memory of millions of viewers. Years later, the Star Wars crew returned to southern Tunisia for the prequel trilogy, and Matmata's Hotel Sidi Driss was used as a set again in 'Attack of the Clones' (2002). The village was tied to the saga's universe for good, and its dining room with dome-shaped decorations became a pilgrimage site for fans from all over the world.
Star Wars changed Matmata's economy. A remote Berber community that lived off the land became a tourist destination. Travellers started coming to see the troglodyte houses, sleep or eat at Luke Skywalker's hotel and learn about life underground. Troglodyte hotels opened, along with houses open to visitors and services for tourists. Cinema gave Matmata a second life and a global profile that its remote location could never have imagined.
Today Matmata is both a tourist icon and a living Berber community. Tourism, driven by the fame of Star Wars and by interest in the troglodyte houses and the culture of the people who built them, is an important part of its economy. The village welcomes travellers from all over the world. They arrive on day trips from Djerba and Gabès or on tours of Tunisia's deep south and visit the underground homes, the Hotel Sidi Driss and the hilly landscape that looks like another planet.
Beyond the film connection, though, Matmata keeps a genuine Berber identity. Many families still live in troglodyte houses, speak Tamazight and keep up their traditions, crafts and a way of life suited to the desert. The neighbouring Berber villages fill out the cultural picture: Tamezret, with its cafés and its living language; Toujane, built in steps up a gorge; and Haddej, with its underground olive presses. Together they show a place that is far more than a film set and one of the richest human heritages of southern Tunisia.
Visiting Matmata means looking into several stories at once. One is about an indigenous people who took refuge in an extreme environment and tamed it with ingenuity. Another is about a unique vernacular architecture that meets the challenge of the climate by digging into the earth. There is the natural disaster that changed the community's life, and the global fame that a handful of film scenes brought to a forgotten corner of the desert. In its dug-out pits and galleries, its Berber cafés serving herbal drinks and the dining room where Luke Skywalker dreamed, Matmata still tells anyone who visits the long story of living underground on the edge of the Sahara.