By July 1801, "Real Carlos" was at Cádiz. When a French squadron repelled a British force at the First Battle of Algeciras on 6 July, "Real Carlos" joined the squadron sent to escort the French from Algeciras back to Cádiz. During the night of 12 July the combined force was returning through the Straits of Gibraltar when a British squadron attacked them at the Second Battle of Algeciras. During the confused night action which followed, HMS "Superb" cut through the rearguard and between "Real Carlos" and "San Hermenegildo". The Spanish ships opened fire, striking one another, as a fire spread across "Real Carlos"'s decks. In the darkness the two huge Spanish ships collided, fire spreading out of control until both exploded in a fireball that could be seen from shore. More than 1,700 men were killed in the blast, one of the greatest losses of life at sea to that time. The heavy Spanish casualties incurred by the defeat contributed to a breakdown of the Franco-Spanish alliance.