Ghana and Mali were two powerful kingdoms in West Africa. Ghana arose first and shared much of the same territory as its successor, Mali. Both of these kingdoms became exceptionally wealthy as a result of trade routes that crossed their lands. Salt from the northern reaches of the Sahara was brought south to trade for gold. Ghana and Mali would impose a tax in exchange for permission to cross their territory. This became the basis of their wealth.
Both these kingdoms also maintained large armies. The revenue collected from merchants provided enough money to maintain large standing armies. Both kingdoms used their armies to expand their territories. They then demanded tribute from the people they conquered, which enriched them even more.
Ghana and Mali also had large urban populations. While they were prolific city builders, this did not come without its problems. Cities put a strain on the surrounding countryside, and when natural resources ran thin, drought and famine resulted.
Despite their many similarities, Ghana and Mali had notable differences. While Ghana was aware of Islam from the Muslim merchants that passed through, there were fewer conversions among its population. Mali, on the other hand, more firmly embraced Islam. It became the religion practiced by its leaders and eventually the official religion of the entire kingdom. Mali quickly became a major center of Islam. The schools built in Timbuktu attracted Muslim scholars and merchants from all over, who came to do business and live there. This helped Mali rise to even greater heights and increased its prestige.
The organization of the kingdoms also differed. The kingdom of Ghana was ruled by a central government out of its capital in Koumbi Saleh. Mali, being a larger and more diverse kingdom, left many local affairs up to local leaders. The different provinces of Mali had their own leaders who reported to the royal court but still maintained a degree of limited local autonomy.
While both kingdoms were very powerful and wealthy, there was one more difference that accounts for Mali's ascendancy. While Ghana occupied important territory between the sources of salt and gold, Mali actually had gold mines within its own territory. It also had a coastline, granting it access to even more trade-routes. These factors made Mali the wealthiest nation of its time.