From the early 15th to the late 16th century, the Songhai Empire was one of the largest African empires in history. This empire was centered around the city of Gao, and its base of power was on the bend of the Niger river in present-day Niger and Burkina Faso. Outside of this, the Songhai lands reached far down the Niger river into modern day Nigeria itself, all the way to the Northeast of modern day Mali, and even to a small part of the Atlantic coast in the West.
Prior to the Songhai, the region was dominated by the Mali Empire, centered around Timbuktu. Mali grew famous due to their immense riches obtained through trade with the Arabic world, and the legendary pilgrimage of Mansa Musa to Mecca. However by the early 15th century, the Mali Empire was in decline. Disputes over succession weakened the crown and many subject peoples broke away. The Songhai were one of them, and made the prominent city of Gao their new capital.
The first great king of Songhai was Sonni Ali. Ali was not Muslim like the Mali kings before him, but believed in the African animism of his ancestors. He was, however, an efficient warrior who in the 1460s conquered many of the Songhai's neighbouring states, including the Mali Empire itself. With his control of critical trade routes and cities such as Timbuktu, Sonni Ali brought great wealth to the Songhai Empire, which at its height would surpass the wealth of the Mali.
Sonni Ali was followed by an emperor named Askia Mohammad, who would preside over Songhai's golden age. Whereas Ali brought conquests, Mohammad brought political reform and revivalization. He set up a complex bureaucracy with separate departments for agriculture, the army, and the treasury, to each of which he appointed supervising officials. A devout Muslim, Mohammad not only completed a pilgrimage to Mecca like Musa before him, but opened religious schools, constructed mosques, and opened up his court to scholars and poets from throughout the Muslim world.
Songhai would continue to prosper until late into the 16th century. Then a civil war over succession would paralyze the country while foreigners looked for ways to capture its resources. The Moroccans invaded soon after to seize the Songhai gold mines. Using gunpowder weapons, the Moroccans easily defeated the Songhai and captured what riches they could. Governing such a vast empire across such long distances however proved too much for the Moroccans, and they relinquished control of the region soon enough, letting it splinter into dozens of tiny kingdoms.