In 1773, the Sultan Mohammed III sent the artillery commander Sidi Tahar Fenis as ambassador to Great Britain to acquire military equipment.[3] On September 19, 1774, he sent a letter to Charles III with this matter, saying that peace between them could only be by sea. Therefore, Charles III declared war on the sultanate on 23 October 1774.[3] Then the governor of Melilla was José Carrión de Andrade. In the city, there was a scarce garrison, which consisted of the fixed regiment of Melilla, with the companies commanded by the captains Antonio Manso and Vicente de Alva, and detachments for the handling of the old iron artillery pieces.[4]
Between September and October 1774, a commission made up of the field marshal Luis Urbina Caneja, the engineer Luis Caballero (who was later during the siege) and the engineer commander Luis Ailmen, was in Melilla to prepare a report on defensive improvements in the square.[5]
Charles III ordered to reinforce the defenses of Ceuta and Oran, due to a possible Ottoman attack. At the end of November, the Spanish learned that the Sultan had planned to conquer Melilla.[3]
To reinforce the defense, Charles III sent Juan Sherlock to Melilla as commander and reinforced the garrison.[3]
Juan Sherlock sent the mariner Juan Trinquini to Malaga to request reinforcements from Andalusia. On 11 December, a French ship arrived in Melilla with reinforcements from the peninsula. The ship left the city on 16 December with part of the civilian population.[3] For defense, 117 new guns and mortars were installed.[7] Tomás de Find, Charles III's major artilleryman, took charge of the maintenance of the artillery. Two Spanish squads, commanded by Antonio Barceló and José Hidalgo de Cisneros, blocked the Strait of Gibraltar to prevent Great Britain from supplying weapons and ammunition to the Muslim troops. A small garrison under Florencio Moreno likewise resisted the Sultan's army at Peñón de Vélez de la Gomera.[7]
In 1775, a British convoy carrying war material en route to Melilla was intercepted and captured by the Spanish Navy and Spanish sail approached the beleaguered city; at the same time the Turks of the Ottoman Empire began to encroach on Morocco's eastern borders.[1]
Spanish troops resisted the attack over a period of 100 days, over which time some 12,000 projectiles were lobbed onto the city.[1] Sherlocke began to break the siege, a situation exacerbated by the desertion of ben Abdallah's Algerians. The siege ended on 19 March.
Aftermath
There was a meeting between Juan Sherlock and the diplomat Hamed al-Gazel, where he told him that the Sultan wanted to maintain friendly relations and resume trade under more advantageous conditions than in the previous treaty. On 20 December 1777, Morocco recognised the United States as an independent nation. With the Peace of Aranjuez in 1780, Spain ceded territories to Morocco, however in return Morocco recognized Spanish rule over the remainder of Melilla.[8]