The attack, which was led by Sinan Pasha and Dragut, appears to have been launched in retaliation for the capture of Mahdia by the Spanish and Hospitallers the previous year.
The siege followed a brief Ottoman attack on the Kingdom of Sicily and Hospitaller Malta, during which the island of Gozo was invaded and sacked and some 5,000 to 7,000 inhabitants were taken as slaves.
[1][4] In September 1550, the town of Mahdia in modern Tunisia – which Ottoman corsair Dragut had been using as a base – was captured by a Spanish-led expedition with Hospitaller support.
These rumours were dismissed by Spanish and Italian knights including Homedes, who believed that the intended destination of the Ottoman fleet was Toulon.
With permission of the Viceroy of Sicily, the captain of the galleys of the Hospitaller fleet recruited a contingent of less than 200 Calabrians and Sicilians as mercenaries and sent them to Tripoli on 7 July 1551.
[8] The Ottoman fleet – which consisted of some 145 ships carrying 10,000 to 12,000 men[6] along with the Gozitan captives – departed Gozo and began heading towards North Africa on 30 July 1551.
[3][7] Shortly after the attack on Gozo, Gabriel d'Aramont – the French ambassador to the Ottoman Empire – arrived in Malta along with his secretary Nicolas de Nicolay.
[1] D'Aramont attempted to dissuade the Ottomans from besieging Tripoli and threatened to sail to Constantinople to make his case to Suleiman, but he was then barred from leaving until the end of the siege.
[7] The Calabrian soldiers, who had only been in the city for a month and were stationed in the small fort at the mouth of Tripoli's harbour, reportedly plotted to desert their posts, blow up a gunpowder magazine and escape to Sicily on a brigantine.
The knights did not accept as they did not have the resources to meet this demand, but at the urging of Murad Agha, Sinan eased the terms, recalled the emissaries, and offered to spare 300 men if the city capitulated.
[3] The mutineers were told that the terms of surrender allowed them to depart to Sicily, and they are said to have rushed out of Tripoli where they were surrounded and imprisoned by Ottoman cavalry.
[7] Des Roches continued to resist until his position was no longer tenable, after which he and some 30 men under his command managed to escape by boat, probably towards d'Aramont's ships.
[3][7] On 15 August, part of the city's garrison including the Hospitaller knights left Tripoli for Malta on ships provided by d'Aramont.
He successfully consolidated Ottoman control over the region, made improvements to Tripoli's fortifications and built a fortified mosque at Tajura.
Dragut had also been promised governorship over Tripoli before he had joined the expedition, and upon the appointment of Murad Agha he left North Africa in protest and sailed to the Tyrrhenian Sea and later to Constantinople with the rest of the Ottoman ships, whose crews had declared that they would only accept him as their commander.
[7][16] The Calabrian soldiers who remained in Ottoman captivity and who thus could not defend themselves were subsequently blamed for the city's fall,[1] but de Vallier and the three other knights were stripped from the habit and cross of the Order.
[7] The Hospitallers anticipated that another Ottoman attack on Malta would take place in the sailing season of 1552,[17] and on 11 September 1551, the Pope implored Homedes to transfer his headquarters to Syracuse or Messina on Sicily.
[3] In response to the previous year's attack on Reggio,[2] in summer 1559 a coalition of Christian states assembled an invasion force for this purpose in Messina.
The fleet left for Tripoli in February 1560 but was unable to storm the city due to inclement weather and disease, and instead captured the island of Djerba.