Morocco with the help of an Ottoman force of 10,000 soldiers dispatched from Algiers in 1576. The Ottoman force captured Fez during that year. Reign (1576–1578) Abd al-Malek recognized the Ottoman sultan Murad III as his Caliph, and reorganized his army on Ottoman lines and adopted Ottoman customs, but negotiated for the Ottoman troops to leave his country, in exchange for a large payment in gold. In the following period he tried to revive trade with Europe and especially England, starting an Anglo-Moroccan alliance with Elizabeth I. According to Richard Hakluyt, as quoted by Edmund Hogan, ruler "Abdelmelech" bears "a greater affection to our Nation than to others because of our religion, which forbids the worship of Idols". He wrote a letter in Spanish to Elizabeth in 1577. Battle of Wadi al-Makhazin (1578) After losing the throne to Abu Marwan Abd al-Malik I in 1576, the ousted Sultan Abu Abdallah Mohammed II had been able to flee to Portugal and then convince King Sebastian to launch a military campaign against Morocco. The campaign turned out to be a complete failure after they were defeated at the Battle of Wadi al-Makhazin in 1578. The battle ended after nearly four hours of heavy fighting and resulted in the total defeat of the Portuguese and Abu Abdallah's army leaving 8,000 dead, including the slaughter of almost the whole country’s nobility, with 15,000 taken as prisoners. Perhaps 100 survivors had managed to escape to the coast. The body of King Sebastian, who led a charge into the midst of the enemy and was then cut off, was never found. The death of Sebastian, Abu Abdallah, and Abd al-Malik has earned the battle the name of "Battle of the Three Kings". Death (1578) Abd al-Malik is known to have been seriously ill in the days leading up to the battle. During the battle itself, he died under unclear circumstances, possibly in combat or from natural causes from his illness. Other accounts, mainly by Moroccan historians, claim that he had been poisoned by some of his officers of Turkish background as part of an Ottoman conspiracy, similar to what had happened to Muhammad al-Shaykh in 1557. While plausible, this account may also have reflected anti-Ottoman attitudes that were present in the court of Ahmad al-Mansur, who succeeded his brother to the throne and ruled from 1578 to 1603. See also Anglo-Moroccan alliance List of rulers of