In the 1500s AD, eastern Nigeria was part of the Islamic Bornu empire. The Bornu built their capital city at Ngazargamu. The Kanem-Bornu ruler Mai Idris Alawma ruled Ngazargamu in the late 1500s. At that time, Ngazargamu was a big walled city. It had organized city planning and wide, straight streets. About 20,000 people lived in Ngazargamu. It was rich enough to have good schools. Many people came to study Arabic and Islamic theology, history and science there.
The Bornu ruled some of eastern Nigeria and Niger, and most of northern Chad. Idris Alawma had diplomatic relations with Ottoman emirs in Tripoli and Cairo. He exchanged gifts with the Ottoman sultans in Istanbul. By 1600, his army, trained by Islamic mercenaries, was using imported guns.
Western Nigeria was mostly under the control of the Hausa Empire. That was between the Bornu empire to the east and the Kingdom of Mali to the west. The Hausa exported enslaved people north across the Sahara Desert to the Ottoman Empire. They also exported gold, leather from their cattle, salt, and henna. In exchange, they got cotton cloth.
Towards the south, the Hausa traded Indian cotton cloth to the Asante Kingdom in Ghana for kola nuts. Kola nuts have caffeine in them, like coffee. People used them to stay energetic and awake, the way people drink energy drinks or coffee today. Sometimes the Hausa fell under the control of the Bornu empire. Other times they were independent, or under the control of the Songhai in Mali.
Then in 1808 AD, Fulani people attacked and destroyed Ngazargamu. The Bornu empire collapsed.