The Songhai Empire was named for its main ethnic group, the Songhai or Sonrai, and was centred on the bend of the Niger River in modern Mali. Songhai began settling this region from the 7th to 9th centuries; by the early 11th century Gao (capital of the former Kingdom of Gao) had become the empire's capital. From 1000 to 1325, the Songhai Empire prospered and managed to maintain peace with the Mali Empire, its powerful neighbour to the west. In 1325 Songhai was conquered by Mali until regaining its independence in 1375. Under king Sonni Ali (r. 1464–1492) Songhai adopted an expansionist policy which reached its apogee during the reign of Askia Mohammad I (r. 1493–1528); at this point the empire had expanded considerably from its Niger-bend heartland, including to the east where much of modern western Niger fell under its rule, including Agadez, which was conquered in 1496. However the empire was unable to withstand repeated attacks from the Saadi Dynasty of Morocco and was decisively defeated at the Battle of Tondibi in 1591; the empire then collapsed into a number of smaller kingdoms.