Timbuktu, also spelt Tinbuktu, Timbuctoo and Timbuktoo, is an ancient city in Mali, situated 20 km north of the Niger River. The town is the capital of the Timbuktu Region, one of the eight administrative regions of Mali. It had a population of 54,453 in the 2009 census.
Starting out as a seasonal settlement, Timbuktu became a permanent settlement early in the 10th century. After a shift in trading routes, Timbuktu flourished from the trade in salt, gold, ivory and slaves. It became part of the Mali Empire early in the 14th century. In the first half of the 15th century, the Tuareg tribes took control of the city for a short period until the expanding Songhai Empire absorbed the city in 1468. A Moroccan army defeated the Songhai in 1591 and made Timbuktu, rather than Gao, their capital. The invaders established a new ruling class, the Arma, who after 1612 became virtually independent of Morocco. However, the golden age of the city, during which it was a major learning and cultural centre of the Mali Empire, was over, and it entered a long period of decline.