Ali Gazi was a ruler of the Bornu Empire. Prior to his reign, the Sefuwa ruling house had split into two ruling branches. The result was palace intrigues and internal strife. He consolidated his reign by killing the candidate from a rival house and restricting opposition from challengers.
Ali Gazi later took on the Bulala nomads, who had driven out his people from Kanem during the decline of the Kanem Empire. He defeated them and re-captured the old Kanem capital, Njimi. He also founded a new capital at Birni Gazargamu.