Spanish–Algerian War (1775–1785)

Spanish–Algerian War
Part of the Spanish–Barbary wars

Bombardment of Algiers (1784)
Date1775–1785
Location
Result Treaty of Algiers
Belligerents
Kingdom of Spain Regency of Algiers
Commanders and leaders
Charles III
Alejandro O'Reilly
Antonio Barceló
Muhammad V
Strength
1775:
20,000 men
7 ships of the line
12 frigates
27 gunboats
5 hulks
9 feluccas
4 mortar boats
7 galleys
3 smaller warships
230 transports
1783:
76 ships
1784:
9 ships of the line
11 frigates
14 xebecs
90 smaller warships
Total:
4,000 Janissaries
15,000 camelry
14,000 infantry
2 demi-galleys
2 xebecs
6 gunboats
1 felucca
70 galliots, gunboats, and other minor ships
Casualties and losses
5,000 dead
2,000 wounded
300 dead (1775)
Unknown total deaths
65 galiots and gunboats destroyed

The Spanish–Algerian War was a conflict between the Spanish Empire and the Regency of Algiers from 1775 to 1785.

An attempted peace treaty in 1766 resulted only in an exchange of captives captured in Barbary corsair attacks. Spain officially declared war in 1775, launching an ill-fated invasion led by Alejandro O'Reilly that was repelled with significant losses. Algerian privateering increased post-invasion, and Spain's attempts at peace through diplomacy with despite the support of the Ottoman Empire.

Two separate bombardments of Algiers by Rear admiral Antonio Barceló in 1783 and 1784 inflicted limited damage, but succeeded to open negotiations. The war concluded in 1785 with a treaty that required Spain to pay 700,000 pesos in exchange for ending piracy against Spain, although hostilities would return a generation later.