Bombardment of Algiers ( 1783 ) The Bombardment of Algiers in August 1783 was a failed attempt by Spain to put end to the Algerine privateering against Spanish shipping . A Spanish fleet of 70 sail under Rear admiral Antonio Barceló bombarded the city eight times between 4 and 8 August but inflicted only minor damages to the Algerine military . Both Spaniards and Algerines fought poorly , but Barceló , apologizing in unfavorable weather conditions , gave the order to withdraw . His expedition was judged a failure at the Spanish court , being described as a " " festival of fireworks too costly and long for how little amused the Moors and was used by who paid it " " . Background . The Algerine privattering against Spanish vessels increased following the disastrous invasion of Algiers in 1775 . Spain tried to reach a peace agreement with the Ottoman Regency with the aim of secure their trading along the Mediterranean . Don Juan de Bouligny was sent to Istanbul in 1782 and managed to obtain a friendship and commercial agreement of Sultan Abdul Hamid I . The Regency , nevertheless , denied to accept the treaty . The Dey , influenced by several of his officers , the " fasnachi " , the treasurer , the " focha " , the " Codgia of cavalry " and the " Aga " of infantry , opted for war ignoring the recommendations of his naval officers . The Spanish chief minister , the Count of Floridablanca , tried then to bribe the Dey with gold to open negotiations for peace , but obtaining no result . King Charles III , feeling the national pride of Spain offended by the Algerines , resolved to punish them bombarding their town . Rear admiral Antonio Barceló was the man appointed to carry out the attack . Though he was by far the most capable naval officer of Spain and one of the few who had risen through the ranks by merits of war , Barceló ' s designation was coldly received both by the Spanish court and military . The Rear admiral was old and illiterate and of humble exctraction , which , together with his naval victories , earned him the envy of most the senior Spanish officers . Bombardment . Barceló sailed from Cartagena on 2 July ahead of 4 ships of line , 4 frigates and 68 small vassels , including gunboats and bomb vessel s . The Algerines had to oppose them no more than 2 demi - gallies of 5 guns each , a felucca of 6 , two xebecs of 4 guns each , and 6 gunboats carrying a 12 and a 24 pounder . On 29 July the Spanish fleet came in sight of the town and two days later Barceló formed his line of battle and made the necessary dispositions for the attack . The bomb - ketches and gunboats , supported by xebecs and other vessels , composed the van , the whole being covered by the ships of line and frigates . The cannonade and bombardment were commenced at half - past two o ' clock , and were continued without intermission till sunset . The attack was renewed on the following , and on every succeeding day util the 9th , when it was resolved at a council of war , for sufficient reasons , to return immediately to Spain . In the course of these attacks 3732 shells and 3833 shot were discharged by the Spaniards , and were returned by the Algerines with 399 shells and 11 , 284 shot . This vast expenditure of ammunition produced no correspondent effect on either side : the town was repeatedly set on fire , but the flames were soon subdued . The example of Gibraltar was followed by the garrison in the use of red - hot balls , but they did not produce a similar effect . The Algerines made several bold sallies with their small vessels , but were constantly repulsed by the superiority of fire from the fleet . While de Dey had refuged at his citadel , the weight of the defense was sustained by an improvised militia composed mostly of teenagers . 25 Algerine heavy guns purchased at Denmark blown up during the battle due to misuse or because its poor conditions . In addition , 562 buildings were destroyed or damaged by the bombardment , an insignificant figure given that Algiers consisted of 5 , 000 buildings and that the whole town was exposed to the Spanish fire . Otherwise , only a gunboat was lost by the defenders . The Spanish casualties were also minimum : 26 killed and 14 wounded . Aftermath . According to the official version released by the Spanish government , the withdrawal was due to bad weather , an excuse not credible , given that the weather conditions in the Mediterranean were favorable in summer . Among the measures used to present the bombing as a success , the most significant was that of numerous promotion s among the participants . The Spanish ' victory ' was sung by numerous poems , most of them exaggerated and of bad taste , but in fact nothing had been achieved . Two months later five Algerian privateers captured two Spanish merchant vessels near Palamós as a gesture of defiance , and a new , far bigger expedition had to be assembled to attack Algiers again .