The Songhay trace their origins to the coming of Aliman Za (or Dia) to the Niger River (near Koukya) in the latter part of the eighth century. With the help of iron weapons, Za conquered the indigenous populations of Gabibi (hunters and farmers) and Sorko (fishers). Aliman Za, probably a Lemta Berber from southern Libya, founded the Za dynasty of Songhay that endured from the latter part of the eighth century to 1491 and the death of Sonni Ali Ber, who was succeeded by Askia Mohammed Toure (founder of the Askiad, the second and last dynasty of Songhay). During the reigns of Sonni Ali Ber and Askia Mohammed, the Songhay Empire reached the zenith of its imperial power. The weaknesses and avarice of most of Askia Mohammed's successors—his sons—sapped Songhay of its strength. In 1591 a small Moroccan force sent to Songhay by El Mansur routed a much larger Songhay army, marking the end of the Songhay Empire. Descendants of Askia Mohammed continued to rule a unified southern state of Songhay until 1660, in what is today Niger. Rivalries among the ruling princes, however, precipitated the balkanization of the south into five principalities: Garuol, Tera, Dargol, Kokoro, and Anzuru. These principalities remained independent until the coming of the French military in 1898.