Almoravid dynasty
The town was ruled by the Zirid dynasty between 973–1146. Then, it was conquered by the Almoravid dynasty, and reached its high point of power under Yusuf ibn Tashfin (c. 1061–1106). Mostaganem was later ruled by the Zayyanid dynasty of Tlemcen and it was conquered again by the Marinid dynasty of Fes. After that the Zayyanid dynasty took control of the city again.