Located about 20 km south of the city of Tataouine, in southern Tunisia, Ksar Ouled Soltane is an attractive and well-preserved fortified granary built by the Berbers in the 15th Century. Built with adobe, the ksar is spread out over two courtyards, each of which has a perimeter of multi-story vaulted granary cellars called ghorfas. In those unruly middle ages, granaries were often fortified to stop raids on a village's food supply. Like other granaries created by North African Berber communities, Ksar Ouled Soltane is located on a hilltop, to help protect it from raiding parties.
Ksar Ouled Soltane was originally built in the 15th century and had hundreds of ghorfas for storage of grains. Later in the 19th century, the ksar was extended into a second courtyard, and the number of ghorfas increased to around 400. The two courtyards are connected by a passage made of palm wood. The ghorfas rise four stories high and accessible by steep external stairs that reach up one by one to the single doors. Each ghorfas was assigned to and used by a single family. For five centuries the nomadic tribes used them to store grain and olives. On Friday afternoons the courtyard functioned as meeting places for the community, the majority of whom spent most of their year in the pastures with their goats, sheep and camels.
Ksar Ouled Soltane appeared in the Star Wars movies as slave quarters where Anakin and his mother lived in the Phantom Menace. The Ksar was repaired in 1997 and restored to its original state, although with cement rather than the original materials of mud and brick. It is now a popular tourist destination.