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 in the Dendi region of modern Niger. There they established the Dendi Kingdom and ruled until the beginning of the 20th century.