The date of the first emergence of the kingdom of Mali is not known although there are references to it as early as the ninth century. However, it was not until the thirteenth century that the kingdom achieved the status of empire through the conquest of a number of rival states. The medieval empire of Mali was formed out of the unification of two distinct Manding groups, an established northern group and a more recent southern group. The unification was achieved by the famous Mali hero Sundiata who defeated Sumaguru Kante, lord of Susu in 1234 and then went on to conquer Ghana, Gangaran and the gold-producing area of Bambuko. The ruling clan, from which the king was selected, was the Keita clan of the northern group which traced its ancestry back to Bilal, the first black follower of the prophet. The empire had two distinct capitals: Kangaba, the religious capital, and Niani, capital of the Keita clan and birthplace of Sundiata. Although some branches of the Mali dynasty were Muslim fairly early on, it was not until the thirteenth century that the kings were Muslim.
After Sundiata the most famous king of Mali was Mansa Musa who made a legendary pilgrimage to Mecca in 1324-5. Although previous kings of Mali had made the pilgrimage to Mecca the journey of Mansa Musa made a particularly big impression because he dispersed large quantities of gold on the way. The amount of gold given away was so large that a contemporary account said that the value of gold in Egypt depreciated considerably after his arrival. In consequence of this the fame of Mansa Musa and Mali spread all over the Islamic world and beyond, so that Mali even appeared on contemporary European maps for the first time. When Mansa Musa returned to Mali he was accompanied by several North African travellers amongst whom was Abu Ishaq al-Saheli a poet from Andalusia who is credited with the introduction of a new style into West African architecture.
Mansa Musa was succeeded by Maghan I (1337-41) about whom little is known except that he had acted as regent for Mansa Musa during his absence on pilgrimage. In 1541 Maghan was succeeded by Mansa Musa's brother Sulayman who reorganized the empire and financial system in order to recover from the excessive expenditure of his brother. Sulayman was the ruler at the time of Ibn Battuta's visit in 1353 so that there is quite a detailed description of his rule including the king's friendly relations with the Marinid sultans of Morocco. Ibn Khaldun traced the careers of the next five kings until the beginning of the fifteenth century, when the kingdom had been seriously weakened by civil wars and was no longer in a position to control all its dependencies which gradually were lost to rival kingdoms. One of the most formidable of these rivals was the Songhay kingdom of Gao or Kawkaw based on the banks of the Niger east of Mali. The arrival of the Portuguese during the fifteenth century introduced another new factor into the politics of the region. The ruler of Mali sought the assistance of these newcomers to fight off African rivals but they were unable to prevent the continuing disintegration of Malian power. In the 1590s the Moroccans occupied Djenne and the rulers of Mali were unable to retake the town. However, the greatly reduced kingdom of Mali continued to survive until 1670 when it was finally destroyed.
Despite its fame there are few architectural remains of the empire of Mali and one is forced to rely mostly on contemporary Arabic descriptions and rather complex oral traditions. At the spiritual capital of Kangaba there is little that remains from the medieval period with the exception of the giant linke (baobab) tree which marks the ancestral centre of the Mali Empire. There are several descriptions of the political capital at Niani, one of the best is that of the fourteenth-century writer al-Umari.
'[The capital] extends in length and breadth to a distance of approximately one barid (postal stage). It is not surrounded by a wall and most of it is scattered .... The town is surrounded on four sides by the "Nile" .... The buildings of this town are made of iwad or clay like the walls of the gardens of Damascus. This consists of building two thirds of a cubit (approximately 30 cm) in clay, then leaving it to dry, then building above it in the same way ... and so on until it is complete. The roofs are of wood and reeds and are generally domed or conical, in the form of cupolas of camel-backs, similar to the arch-shaped openings of vaults.'
Ibn Battuta's description of 1353 is not so full although he does indicate that he reached the city by boat and that it had a separate quarter for white merchants. He then describes the king's palace in some detail, in particular the audience hall which may be the same as that built by Abu Ishaq al-Saheli a decade or two earlier. The audience hall is contained within the palace and consists of a square domed chamber with triple-arched windows in each side. The windows are filled with wooden lattice work or grilles covered in silver and gold leaf (mashrabiyya?). Ibn Khaldun probably describing the same building notes that it was 'solidly built and faced with plaster; because such buildings are unknown in his [the sultan's] country'. Obvious parallels for this building can be found in the architecture of fourteenth-century North Africa and Spain (compare for example the Salon del Trono in the Alhambra). Next to the palace was a large open area used as a mosque or place of prayer.
The location of Mali's capital is unknown although it may be the site of Niani-en-Sankrani in Guinea occupied between the sixth and seventeenth centuries. Archaeological work at the site has revealed a large complex with a fortified royal compound, several residential areas, a metal-working centre and many cemeteries. A possible mosque site and Muslim cemetery have been identified near the royal complex which consists of a large square courtyard (20 m per side) and a smaller circular structure. The residential structures at the site consist of roundhouses built of mud with stone foundations.