Mazagan Ambush

In 1640, the Moroccans, led by Sidi al-Ayachi ambushed a Portuguese force from Mazagan, successfully killing most of them, including their commander.

According to Ahmad ibn Khalid an-Nasiri, the city of Azemmour had signed a peace treaty with Mazagan at a time of political turmoil in Morocco.

[2] However, according to Portuguese sources, a group of Moroccans came to Mazagan in April and told the captain, Dom Francisco de Mascarenhas, that the Moroccan sultan, Muhammad ibn Sharif, asked the Portuguese for some aid against his enemies, to which he agreed, though his commanders warned him of such an act.

The captain of the fort then marched out with a force of 140 knights, and al-Ayachi stationed himself in a forest nearby the town.

When the captain arrived in the forest, al-Ayachi cut off their escape route and encircled the Portuguese with a force of 4,000 infantry and cavalry.