Chinguetti () () is a ksar and a medieval trading center in northern Mauritania, located on the Adrar Plateau east of Atar. Founded in the 13th century as the center of several trans-Saharan trade routes, this small city continues to attract a handful of visitors who admire its spare architecture, scenery, and ancient libraries. The city is seriously threatened by the encroaching desert; high sand dunes mark the western boundary and several houses have been abandoned to the sand. The town is split in two by a wadi. On one side, there is the old sector, and on the other the new one. The indigenous Saharan architecture of older sectors of the city features houses constructed of reddish dry-stone and mud-brick techniques, with flat roofs timbered from palms. Many of the older houses feature hand-hewn doors cut from massive ancient acacia trees, which have long disappeared from the surrounding area. Many homes include courtyards or patios that crowd along narrow streets leading to the central mosque. Notable buildings in the town include The Friday Mosque of Chinguetti, an ancient structure of dry-stone construction, featuring a square minaret capped with five ostrich egg finials; the former French Foreign Legion fortress; and a tall watertower. The old quarter of Chinguetti has five important manuscript libraries of scientific and Qur'anic texts, with many dating from the later Middle Ages. In recent years, the Mauritanian government, the U.S. Peace Corps, and various NGOs have attempted to position the city as a center for adventurous tourists. Visitors may "ski" down its sand dunes, visit the libraries, and appreciate the stark beauty of the Sahara. History Occupied for thousands of years, the Chinguetti region was once a broad savannah; rock paintings at Agrour Amogjar, in the nearby Amogjar Pass, feature images of giraffes, cows, and people in a green landscape. It is quite different from the sand dunes of the encroaching desert, which make up most of the region today. The city was founded in AD 777 and, by the 11th century, had become a trading center for a confederation of Berber tribes, known as the Sanhaja Confederation. It was a crossroads of trade routes. Soon after settling Chinguetti, the Sanhaja first interacted with (and eventually melded with) the Almoravids, represented by Abdallah ibn Yasin. The Almoravids would eventually control an empire stretching from present-day Senegal to southern Spain, called al-Andalus (the modern-day Andalucia). The city's