The Moroccan ruler formed an alliance with the Spanish against the Ottomans. After his victory he even occupied Tlemcen for a short period.
The Moroccan ruler formed an alliance with the Spanish to oppose the Ottomans, and subsequently occupied Tlemcen briefly after his victory.