In summer 1578, a Portuguese campaign led by Sebastian I and accompanied by Al-Mutawakkil began to invade northern Morocco toward the capital then, Fez. On August 4- 1578, Abdul Malik's army and the Ottoman garrison battled the Portuguese and Al-Mutawakkil’s army in a battle called Wadi al-Makhāzin or Battle of Three Kings. The battle ended with the defeat of Portuguese army, and the death of three kings: Al-Mutawakkil, Abdul Malik and Sebastian I.