
Alexander O'Reilly had built a career on cleaning up other people's messes. An Irishman in Spanish service, he had personally protected King Charles III from an assassination attempt, received Havana back from the British after the Seven Years' War, and crushed a French settler rebellion in Louisiana. So when Charles III needed someone to demonstrate the might of Spain's reformed military to the Barbary States of North Africa, O'Reilly was the obvious choice. He sailed from Cartagena in the summer of 1775 with 20,000 men and 304 ships. He came back with his reputation destroyed, a quarter of his force dead or captured, and nothing to show for the most ambitious Spanish military operation since the conquest of the Americas.
The invasion's problems began at the waterline. O'Reilly's landing craft were supposed to deliver troops to a beach suitable for offloading the heavy artillery needed to bombard Algiers' walls. Instead, the pilots of the landing craft sailed to the wrong stretch of coast entirely. The guns became stuck in wet sand the moment they were brought ashore, rendering them useless. Spanish troops formed up without artillery support on a blistering July day, sweltering in the North African heat they had not trained for. The Marquis de La Romana, leading two regiments, was killed by two shots to the chest within minutes of stepping onto the beach. Meanwhile, the defending forces under Baba Mohammed ben-Osman had been reinforced by tribal warriors from Algeria's interior, who had been tipped off about the invasion by Berber merchants in Marseille who had tracked Spanish military preparations all spring.
The Algerian defenders offered only light initial resistance, falling back steadily as the Spanish advanced inland. O'Reilly's men pursued, interpreting the retreat as cowardice. It was neither. The Algerians were drawing the Spanish into a carefully chosen killing ground where they could attack from cover. By the time the Spanish realized they were surrounded, it was too late to form an effective defensive line. The rout was catastrophic. Over 5,000 Spanish soldiers were killed or wounded -- a quarter of the entire force. Five generals were killed and fifteen wounded, including Bernardo de Galvez, the future hero of the American Revolution. The Algerians captured fifteen artillery pieces and some 9,000 weapons. Only the intervention of Tuscan admiral John Acton, who cut his anchor cables and drove his ships close to shore, pouring grapeshot into the pursuing Algerian cavalry, prevented a complete annihilation.
Two thousand Spanish soldiers were captured, cut off from the boats that could have carried them to safety. O'Reilly spent a month negotiating their release. He wanted to salvage something from the disaster by bombarding Algiers from the sea, but discovered he lacked the provisions even for the voyage home. The fleet limped back to Alicante. The post-mortem was damning: the Spanish had no intelligence on Algerian positions or strength, while the Algerians knew everything about the Spanish. O'Reilly's troops were largely raw recruits; the Algerian defenders included battle-hardened veterans. Most critically, the bitter personal relationship between O'Reilly and the Spanish naval commanders had produced an extraordinary lack of coordinated planning. Spain would try twice more to strike Algiers by sea, bombarding the city in 1783 and 1784, and failing both times. It took the appointment of the Count of Floridablanca as foreign minister in 1777, and fifteen years of skillful diplomacy, to stabilize Spain's position on the Barbary Coast -- achieving through negotiation what O'Reilly's armada could not accomplish by force.
Located at 36.783N, 3.067E off the coast of Algiers. The 1775 landing took place on beaches west of the city, near the area where the French would successfully land in 1830. The coastline is low and sandy in places, with the city of Algiers visible to the east. Nearest airport: Houari Boumediene Airport (DAAG), approximately 16 km southeast. The Bay of Algiers and the approach from the Mediterranean are prominent features from any altitude.