Gao was established by the Songhai people at about the same time as the Soninke established Ghana. Gao never flourished as Ghana did and, after the fall of Ghana, Gao became a vassal state of Mali. In 1335, Gao became independent of Mali.
It was not until Sunni Ali Ber, a member of the Sunni dynasty, ascended to the throne in 1464, that the rulers of Gao looked beyond the confines of the Niger valley. In 28 years he turned the kingdom of Gao into the Songhai empire, which stretched from the Niger in the east to Jenne in the west and from Timbuktu in the north to Hombori, the wide arch formed by the Northern Niger bend, in the south. Songhai ultimately developed into the greatest of the Sudanic empires and, like Mali and Ghana, was strategically located along trans-Saharan trade routes.
Sunni Ali Ber's reign was one military campaign after another, extending the frontiers of his kingdom through conquest. Sunni Ali Ber built a well-organized army, which consisted of infantry, cavalry and a powerful navy—a fleet of ships manned by Sorko fishermen—which patrolled the Niger. Sunni Ali Ber cut a wide swath across the Western Sudan and punished his enemies mercilessly.
In 1468, supposedly invited by the people of Timbuktu, Sunni Ali Ber embarked on his military career by invading Timbuktu to oust the Tuaregs, who had wrested control from Mali in 1434. Timbuktu fell easily as Akil, the Tuareg chief, fled to Walata. Sunni Ali Ber looted and burned the city and is said to have murdered most of the priests and scholars there. Sunni Ali Ber then headed south and, in 1473, captured Jenne after a siege reputed to have lasted seven years, seven months and seven days. By contrast, Sunni Ali Ber was merciful at Jenne.
Sunni Ali Ber regarded the Mossi as a serious threat to his burgeoning power. In 1480, he encountered them after they had sacked Walata. He hounded them throughout the Western Sudan and succeeded in driving them back to their home. Next, he defeated the Fulani of Massina. Sunni Ali Ber had an intense hatred for them as he did all foreigners. In 1483, he went to war with the Mossi, repulsing them again and finally ending the Mossi threat in 1486.
In 1492, Sunni Ali drowned while returning home after a victory against the Fulani of Gurma.
In the same year Christopher Columbus, harbinger of the Atlantic slave trade, set sail for the New World.
During his reign, Sunni Ali Ber showed little respect for the Muslim religion. He kept up the outward appearance of a Muslim, primarily for political purposes, as parts of his kingdom practiced the faith. He neither relinquished the traditional Songhai religion, or did he recognize Islam as the state religion.
Although it is purported that he ruled from horseback, Sunni Ali Ber did establish an effective system of government. He turned the conquered states into provinces, with a combination of his choices and extant rulers as governors. Consequently, Songhai became a centralized state dominating the entire Niger region. Special organizational arrangements were made for Timbuktu and other Muslim provinces. Additionally, he installed a commander-in-chief for his navy.
Arab historians have been harsh in their assessment of Sunni Ali, as expected from his anti-Muslim stance, and have depicted him as a tyrant and despot. Nevertheless, he positioned Songhai as Sundiata did for Mali and laid the foundation for Askia Mohammed to take Songhai to its greatest heights as an Islamic state.