Conquest of Tunis ( 1574 ) The Conquest of Tunis in 1574 marked the final conquest of Tunis by the Ottoman Empire over the Spanish Empire . This was an event of great significance as it decided that North Africa would be under Muslim rather than Christian rule , ended the Spanish " Conquista " of Northern Africa started under Isabella I of Castile and Ferdinand II of Aragon . The capture of Tunis in 1574 " sealed the Ottoman domination of the eastern and central Maghreb " . Background . Tunis had initially been conquered by the Ottomans under Hayreddin Barbarossa in the Conquest of Tunis ( 1534 ) . However , but the Holy Roman Emperor Charles V had recaptured it in the Conquest of Tunis in 1535 . He established a garrison and a vassal ruler in the person of the Hafsid dynasty ruler Al - Hasan . The Bey of Algiers Uluj Ali Pasha captured Tunis in 1569 for the Ottoman Empire , but in the aftermath of the 1571 Christian victory at the Battle of Lepanto , John of Austria managed to take Tunis in October 1573 . Capture of Tunis . In 1574 , William of Orange and Charles IX of France , through his pro - Huguenot ambassador François de Noailles , Bishop of Dax , tried to obtain the support of the Ottoman ruler Selim II in order to open a new front against the Spanish king Philip II . Selim II sent his support through a messenger , who endeavoured to put the Dutch in contact with the rebellious Moriscos of Spain and the pirates of Algiers . Selim also sent a great fleet to attack Tunis in the Autumn of 1574 , thus succeeding in reducing Spanish pressure on the Dutch . In the Battle of La Goleta , Selim II mustered a fleet of between 250 and 300 warships , with about 75 , 000 men . The Ottoman fleet was commanded by Sinan Pacha and Alūj Ali . The Ottoman fleet combined with troops sent by the governors of Algiers , Tripoli and Tunis , for a combined strength of about 100 , 000 . The army attacked Tunis and La Goleta , the " presidio " of La Goleta , defended by 7 , 000 men , falling on 24 August 1574 . The last Christian troops in a small fort opposite Tunis surrendered on 3 September 1574 . John of Austria attempted to relieve the siege with a fleet of galleys from Naples and Sicily but failed due to storms . The Spanish crown , being heavily involved in the Netherlands and short of funds was unable to help significantly . Cervantes participated to these events as a soldier , and was among the troops of Don Juan of Austria which tried to rescue the city . He claims that the Ottomans led 22 assaults against the fort of Tunis , losing 25 , 000 men , while only 300 Christians survived . He wrote about the battle : Abd al - Malik , the future Moroccan King , participated to the 1574 conquest of Tunis on the side of the Ottomans . Gabrio Cervellón was the commander of the fort of Tunis . The general of La Goleta , Don Pedro Portocarerro was taken as a captive to Constantinople , but died on its way . The captured soldiers were employed as slaves on galleys . The battle marked the final establishment of Ottoman rule in Tunis , putting an end to the Hafsid dynasty and the Spanish presence in Tunis . The success of the Turks in the battle of Goleta managed in reducing Spanish pressure on the Dutch , and leading to negotiations at the Conference of Breda . After the death of Charles IX in May 1574 however , contacts weakened , although the Ottomans are said to have supported the 1575 - 1576 revolt , and establish a Consulate in Antwerp ( " De Griekse Natie " ) . The Ottomans made a truce with Spain , and shifted their attention to their conflict with Persia in the Ottoman – Safavid War ( 1578 – 1590 ) . The Spanish crown fell into bankruptcy on 1 September 1575 .