In the 16th century the Ottomans undertook several expeditions to the Saadi Sultanate, a state which ruled present-day Morocco and parts of Northwest Africa.
In the early 16th century in Morocco, the country was not united under one dynasty and the Wattasids and Saadis became enemies, which led to the Wattasids seeking military help from the Ottomans.
In 1545 Ali Abu Hassun, the Wattasid ruler in northern Morocco, recognised the full authority of the Ottoman sultan, sent a letter of submission and declared himself an Ottoman vassal thus attributing a vassal status to Fez. Later on in 1549, the Ottomans were unable to militarily intervene when the Wattasids lost Fez to their Saadian rivals under their leader Mohammed ash-Sheikh.
Abu HassunâÂÂs alliance with the Ottomans ultimately led to the Capture of Fez in 1554. According to , the forces of Salah Rais consisted of 4,000 troops and the forces of Mohammed ash-Sheikh were more than 20,000 and outnumbered Salah Reisâ army by more than five to one. According to Ernest Mercier, Salah Reisâ troops were numbered at 11,000 men while ash-Sheikh's forces were numbered at 40,000. Salah Reis was able to defeat the Saadians and conquer Fez, installing the Wattasid sovereign Abu Hassun on the throne as a vassal of the Ottomans.
The Ottoman troops, Turks and Berbers from Kabylia stayed in Fez for four months harassing the population until Ali Abu Hassun bought the withdrawal of the Ottoman troops. Upon his withdrawal from Fez, Salah Rais assured the Saadi ruler that he would grant his enemy, Ali Abu Hassun, no further assistance. Ali Abu Hassun then hired mercenaries for his own army. However, the Wattasids now without the help of the Ottoman troops were defeated in the Battle of Tadla and Fez was reconquered by the Saadis.
After the Saadi ruler ash-Sheikh had been assassinated by the Ottomans, Abd al-Malik and his brother fled from Morocco. During his exile, Abd al-Malik became a trusted member of the Ottoman establishment. Murad III agreed to a proposition made by Abd al-Malik of making Morocco an Ottoman vassal in exchange for MuradâÂÂs support in helping him gain the Saadi throne. Murad III then ordered the governor of Algiers, Ramadan Pasha, to invade Morocco and install Abd al-Malik on the throne as an Ottoman vassal, and so they left from Algiers.
Ramadan Pasha arrived in Fez with Abd al-Malik and the Ottoman army, Fez was easily conquered, which then caused the Saadi ruler, Abu Abdallah Mohammed, to flee to Marrakesh. However, Marrakesh was also conquered following a battle at Khaynuqa-r-Rayhan on 14 July. In both the Battle of Ar-Rukn and the Battle of Khaynaqu-r-Rayhan, an Ottoman half moon formation like that of the Battle of Mohacs was used. Abd al-Malik then assumed rule over Morocco as an Ottoman vassal recognising Ottoman suzerainty. Murad's name was recited in the Friday prayer and stamped on coinage marking the two traditional signs of sovereignty in the Islamic world. Abd al-Malik sent the Ottoman troops back to Algiers in exchange for gold while suggesting a looser concept of vassalage than the Ottoman sultan, Murad III, may have supposed. Abd al-Malik had recognised himself as a vassal of the Sublime Porte. The reign of Abd al-Malik (1576-1578) is understood to be a period of Moroccan vassalage to the Ottoman Empire.
After the victory, Abd al-Malik received a letter from Murad III offering fatherly congratulations, but expressing his disappointment at an unfinished job, as the deposed ruler, Abu Abdallah Mohammed, remained alive. He was the first Saadi ruler to break the tradition of not entering any bond of vassalage with a foreign entity and his letters described him as âÂÂSlave of the Great Turk.â He set his contingent of Turkish advisors to reshape his army along Ottoman lines.
Under Abd al-Malik, Moroccan society underwent an Ottomanization process which continued under his successor, Ahmad al-Mansur. He adopted Turkish clothing for himself, his subjects and his army, dressing himself like an Ottoman, he also used Ottoman titles for his officials, he Ottomanized his army as well as his administration and he spoke Turkish in court. He designed the entire defence strategy for his state, largely based on help from the Turkish army. Firepower was considerably increased, Moroccan cavalrymen were trained to manoeuvre in the Turkish style and the title âÂÂsipahiâ was adopted for the mounted arquebusiers. Thus the Saadians followed the Turkish example by observing the equipment and the organisation of the Turks of Algiers.
In 1578, Abd al-Malik fought a battle against the Portuguese Empire in which he lost his life. However, the outcome of the battle was an immense victory. During the battle, although the exact formation is difficult to unravel, Abd al-MalikâÂÂs army closely followed the classical Ottoman formation and implemented a variant of the Ottoman practice of concealing artillery. Abd al-Malik was succeeded by his brother Ahmad al-Mansur who formally recognised the suzerainty of the Ottoman Sultan at the beginning of his reign while remaining de facto independent. However, Ahmad stopped minting coins in MuradâÂÂs name, dropped MuradâÂÂs name from the Khutba and declared his full independence in 1582. Ahmad al-Mansur continued the Ottomanization process in Morocco and seems to have attributed the victory at Alcácer Quibir to the influence of the Turkish troops and officers who served under Abd al-Malik, he considered them to be the best equipped, organised, disciplined and trained on the field.
The Beylerbey of Algiers then convinced Murad III to authorise an attack on Morocco. Ahmad then sent an embassy with sizeable gifts to Constantinople, with the hopes of Murad III calling off the attack. The Moroccans paid a tribute of more than 100,000 gold coins and agreed to show respect to the Ottoman Sultan, in return they were unofficially left alone. In the same year, Moroccan envoys attended a ceremony at Istanbul for Mehmet III and brought many gifts, apart from the gifts they also made a payment of four thousand gold in taxes as they were under Ottoman protection. They agreed to a treaty of mutual recognition and maintained peaceful relations. Every year Ahmad sent a gift to Istanbul which the Ottomans saw as a tribute, acknowledging their supremacy, and the Moroccans saw as a way of honouring the Ottomans for defending the Islamic lands. In 1587, Ahmad al-Mansur did not pay tribute, however there is strong evidence that he continued to pay tribute to the Ottomans through to the end of the sixteenth century. The relations between Ahmad al-Mansur and the Ottomans were ambiguous, sometimes he recognised Ottoman sovereignty theoretically by sending tribute to the Ottoman sultan and pronouncing the khutba said in his name, while at other times he rejected the Ottoman claims, had the khutba in his name and minted money in his own name.