First Battle of Algeciras: Outnumbered French Navy ships defeat the Royal Navy in the fortified Spanish port of Algeciras.

The First Battle of Algeciras was a naval battle fought on 6 July 1801 (17 messidor an IX of the French Republican Calendar) between a squadron of British Royal Navy ships of the line and a smaller French Navy squadron at anchor in the fortified Spanish port of Algeciras in the Strait of Gibraltar. The British outnumbered their opponents, but the French position was protected by Spanish gun batteries and the complicated shoals that obscured the entrance to Algeciras Bay. The French squadron, under Contre-Amiral Charles Linois, had stopped at Algeciras en route to the major Spanish naval base at Cadiz, where they were to form a combined French and Spanish fleet for operations against Britain and its allies in the French Revolutionary Wars. The British, under Rear-Admiral Sir James Saumarez, sought to eliminate the French squadron before it could reach Cadiz and form a force powerful enough to overwhelm Saumarez and launch attacks against British forces in the Mediterranean Sea.

Sailing directly from his blockade station off Cadiz, Saumarez's squadron consisted of six ships of the line, twice the number under Linois's command. Discovering the French at anchor in Algeciras on the morning of 6 July, Saumarez launched an immediate attack on the anchorage through the complicated shoals of Algeciras Bay. Although the initial attack caused severe damage to the French ships, light winds and shallow water led to the British ship HMS Hannibal grounding under heavy fire while the French vessels were driven on shore to prevent their capture. With his intentions frustrated, Saumarez ordered his squadron to withdraw, five of his ships limping out of the bay while the battered Hannibal remained trapped. Isolated and unable to manoeuvre, Captain Solomon Ferris on Hannibal endured the enemy fire for another half an hour before surrendering his ship.

Both sides had suffered severe damage and casualties, but both were also aware that the battle would inevitably be rejoined and so the aftermath of the British defeat was one of frenzied activity at Gibraltar, Algeciras and Cadiz. While the British and French squadrons conducted hasty repairs, the French and Spanish fleet at Cadiz was prepared for a rescue mission, a heavy squadron arriving at Algeciras on 12 July. As the Spanish squadron departed with Linois's ships, they were attacked again by Saumarez's squadron at the Second Battle of Algeciras and caught at night by faster and more manoeuvrable ships, which resulted in the British inflicting heavy losses on the Spanish rearguard but failing for a second time to destroy the French squadron.