Starting out as a seasonal settlement, Timbuktu in Mali became a permanent settlement early in the 12th century. After a shift in trading routes, the town flourished from the trade in salt, gold, ivory and slaves from several towns and states such as Begho of Bonoman, Sijilmassa, and other Saharan cities.[[[Wikipedia:Citing_sources|page needed]]]_1-0" class="reference"> It became part of the Mali Empire early in the 14th century. By this time it had become a major centre of learning in the area. 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.