The depredations of the north African pirates had been a menace to sea-borne trade for centuries. At times they had plundered not only in the Mediterranean but in the Atlantic and, on occasions, even so far afield as the North Sea. The larger powers had frequently made treaties with the various beys (or the Dey of Algiers) but these had seldom been effective for long. Small countries either sought the protection of the flags of the larger naval powers or suffered a proportion of their trade to be preyed upon and their seamen taken into slavery. The long wars which had followed the French revolution had greatly exacerbated the problem, for none of the European states had been able to spare forces to deal with African pirates and only the United States had acted when, in 1804, the Marines had made their famous foray against ‘the shores of Tripoli’. For Britain the war years had been a time for conciliating the beys. The British fleet had constantly supplied itself with food and water along the Algerian coast and during the Peninsular War the population of Portugal had largely been fed on corn from the Barbary Coast. The little port of Arzew alone had sent 300 cargoes annually to Lisbon between 1809 and 1813. The French, when they had the opportunity, behaved similarly. It was in Algiers that Bonaparte placed contracts for supplying his army in Malta and Egypt. Even after the war the government of the restored Louis XVIII believed that it was so important to conciliate the Dey of Algiers that in 1819 they paid a debt of £280,000 left by Napoleon.
Before that time the British had already acted against the Dey. Since they were pressing the powers of Europe to follow their example in abolishing the slave trade they felt it incumbent on them to take some steps to free the Christian slaves on the Barbary Coast. They entrusted this task to Vice-Admiral Lord Exmouth, better known as the distinguished frigate captain, Sir Edward Pellew. He was given a squadron consisting of five ships of the line and seven smaller ships and with it he visited Algiers, Tunis, and Tripoli. He ransomed 1,792 slaves, mostly Italians, and from the last two ports extracted treaties ensuring that Christian captives would not be enslaved. From Algiers no such undertaking could be obtained, the Dey knowing that it was more than his life was worth to pledge his unruly subjects in this way. There was a sharp quarrel between Dey and Admiral and, had the wind been favourable, Exmouth might well have attacked the city immediately. Instead there was an uneasy pause lasting two days after which the Dey sent the Admiral an ostrich and a promise that he would refer the question to his nominal overlord, the Sultan of Turkey. This was a meaningless concession since it was many years since the rulings of the Sublime Porte had been received in Algiers with anything more than respectful derision. Exmouth, who was uncertain of the political support he might receive from London, decided to accept the Dey’s gesture and sailed for home.
As he reached the Channel, news arrived that Algerian troops had massacred 2,000 Sardinian fishermen at Bone and the squadron was immediately ordered back to the Mediterranean with instructions to secure the abolition of Christian slavery in Algiers, together with the repayment of the ransom money recently given to the Dey. No land force was offered to him, nor did Exmouth, as far as can be ascertained, ask for one but on reaching Gibraltar he embarked a company of the Royal Sappers and Miners. He also strengthened his fleet with a few small auxiliary vessels and accepted the support of a Dutch frigate squadron which offered to serve under his orders. He thus had a combined force of thirty-four sail and as they made their way eastward he learned that the Algerians had arrested eighteen British sailors, the crews of two boats from HMS Prometheus, and that as a final insult the British Consul in the city had been confined In Irons.
Exmouth’s problem was one of extreme difficulty. The city of Algiers was stone-built and it was unlikely that bombardment would have any significant effect on it. All he could do was to destroy the shipping in the harbour which was very heavily defended. The seaward side was protected by a long narrow island which, near its northern end, was linked to the mainland by a breakwater 250 yards long. Both island and breakwater were intensively fortified. The northern tip of the island carried a semi-circular battery mounting forty-four guns in two tiers. At the junction of island and breakwater was the lighthouse battery, another forty-four gun work but in three tiers and on the southern stretch of the island was a sixty-six gun three-tier battery flanked by four smaller works mounting, between them, sixty more guns. A mole projected from the shore to narrow the entrance to the harbour and this was protected by batteries on the shore which, like those on the island, were built of masonry five feet thick. In all 1,000 guns were mounted to protect the harbour and most of them were 18-, 24-, or 32-pounders except at the southern tip of the island where there were two 68-pounders each 20 feet long. In the harbour were 4, 44-gun frigates, 5 large corvettes, and 35 bomb and mortar vessels. The city’s garrison amounted to 40,000 more or less disciplined troops and the population was large, hostile, and armed.
To pit ‘wooden walls against stone’ was traditionally an unprofitable naval operation and the prospects for a successful attack would have been small had not Lord Exmouth been a master tactician. Fortunately he knew the harbour well and, on his earlier visits, had had the approaches carefully sounded and charted. He had realised that there was a position off the south-eastern side of the island where four battleships could lie out of the worst of the defensive fire while having the flanks of the batteries within range.
An ultimatum was sent to the Dey on 27 August 1816 and, no answer being returned, the fleet went into action. The Dutch frigates and some of the smaller British ships engaged the mainland batteries while four ships of the line made for the ‘dead ground’. Exmouth’s flagship Queen Charlotte (100) pushed on to within 50 yards of the mole and engaged an Algerian frigate which was moored across the entrance to the harbour. A counterattack by gunboats was frustrated by the frigate Leander which sank thirty of the attacking craft. A boat from the Queen Charlotte then boarded and fired the frigate at the harbour mouth and an explosion vessel loaded with 143 barrels of powder was sailed to the foot of the most northerly battery and when it was fired the battery all but disappeared. From a range of 2,000 yards bomb vessels and others mounting Congreve rockets set about destroying the shipping inside the harbour while three ships of the line hammered the southern island batteries from the relative security of the ‘dead ground’. Unfortunately one battleship, Impregnable (98) dropped her anchor too soon and for some time lay under the fire of the main batteries, suffering 200 casualties.
By 10 pm the fire from the batteries was almost silent, the shipping in the harbour had all been destroyed and the warehouses at the dockside were in flames. Some 7,000 Algerians had been killed and wounded, the British and Dutch ships having lost 141 killed and 742 wounded. There was scarcely a round of shot left in the fleet and they had fired away 118 tons of powder. On the following morning the Dey agreed to all Exmouth’s demands. He released a further 1,200 slaves, repaid 382,500 dollars of ransom money, and gave 30,000 dollars as compensation to the imprisoned consul. He also undertook to abolish slavery, a pledge which resulted in his murder by his subjects who also killed his two successors within thirteen months. Meanwhile the fortifications were rebuilt and, before the end of 1816, a Barbary pirate captured a prize within sight of Dover.