The Askiya dynasty, also known as the Askia dynasty, ruled the Songhai Empire at the height of that state's power. It was founded in 1493 by Askia Mohammad I, a general of the Songhai Empire who usurped the Sonni dynasty. The Askiya ruled from Gao over the vast Songhai Empire until its defeat by a Moroccan invasion force in 1591. After the defeat, the dynasty moved south back to its homeland and created several smaller kingdoms in what is today Songhai in south-western Niger and further south in the Dendi.