The ancient West African kingdoms of Ghana and Mali gained their wealth by capitalizing on the trans-Saharan trading of gold and salt. Both empires took advantage of the abundance of minerals in the region to build up surpluses, and this allowed them to expand their territories through trade and conquest.
The ancient Kingdom of Ghana predated the Mali Empire by several centuries. Ancient Ghana was so abundant in gold that even its dogs wore golden collars. The kingdom was able to grow its wealth even further by trading with Arab merchants, who would travel over two months across the Sahara desert to trade their salt in exchange for West African gold, ivory and slaves. Ghana also traded its gold for horses, cloth, swords and books from the European kingdoms.
Like its predecessor Ghana, the Mali Empire was able to grow rich by capitalizing on its natural resources and creating advantageous trading practices. At its height, Mali contained three massive gold mines within its territory. It expanded on its wealth by taxing every bit of salt and gold that went inside or out of its borders. It retained its wealth in gold by declaring gold nuggets to be the sole property of the king. Gold dust was legal to trade, but gold nuggets were not.