In the 1590s, Saadi sultan Ahmad al-Mansur appointed Spanish military leader Judar Pasha to lead a campaign, conquering the Songhai empire in West Africa. Thanks to his army, Morocco took control of gold and salt trade routes.