The military leader Sunni Ali Ber became the first ruler of the empire who was credited for vast territorial expansions. In 1591, a civil war occurred, which paved the way for the Moroccan invasion led by Sultan Ahmad I al-Mansur Saadi and eventually led to the collapse of the Songhai Empire.