Battle of 4 May

The Battle of 4 May was fought in open sea near Salvador, Bahia, on 4 May 1823, between the Imperial Brazilian Navy, under the command of British admiral Thomas Cochrane, and the Portuguese Navy during the Brazilian War of Independence.

Background
During the period of Portuguese control of Brazil, commerce had been largely restricted to Portuguese ships with Portuguese crews; few Brazilians had the opportunity to become proficient sailors. Following the Brazilian Declaration of Independence from Portugal in September 1822, Brazil began assembling a fleet of warships; but had difficulty finding trained sailors to man those ships. In December 1822 Brazil solicited English mercenaries with the offer of Portuguese prizes. Thomas Cochrane, who ended Spanish control of Chile with the capture of Valdivia in February 1820, was offered command of the Brazilian fleet.

Cochrane arrived on 13 March 1823 with several officers and seamen who had served with him in Chile. After some negotiation about terms of compensation, Cochrane assumed command of the Brazilian fleet aboard the flagship Pedro I on 21 March 1823. On 29 March he received orders to blockade Bahia and destroy or capture any Portuguese shipping he found there. Cochrane sailed on 3 April with the frigate Piranga and the American clippers Liberal and Maria da Glória which were armed as corvettes. The brig Guarani and schooner Real accompanied the squadron for use as fire ships; but they were unprepared for combat. The frigate Nitherohy joined the squadron on 29 April.

Cochrane's flagship Pedro I was rated as a 74-gun ship of the line, although she might have been considered a 64-gun third-rate by Royal Navy standards. Cochrane found fabrics had deteriorated so sails were frequently torn by the wind and gunpowder bags were unsafe to use without swabbing the cannon bore with sponges between shots. Cochrane's crew fashioned new powder bags from flags, but Cochrane remained dissatisfied with the quality of gunpowder and lamented the absence of flintlock mechanisms on the cannon. His flagship crew consisted of 160 English and North American sailors and 130 black marines recently emancipated from slavery, with the remainder marginally qualified Portuguese sailors paid less than half the standard wage for experienced seamen. Cochrane considered the crew to be 120 men short of a normal complement and estimated 300 more men might be effectively employed in battle conditions. The marines' experience as slaves caused them to believe they should not be assigned cleaning tasks as free men, so the Portuguese sailors performed cleaning tasks rather than practicing seamanship.

Battle
On 30 April, the Portuguese prepared to battle the Brazilian squadron. Shortly after sunrise on 4 May 1823 the Brazilian squadron detected the Portuguese line of battle as thirteen sail to leeward. To compensate for the numerical inferiority of Brazilian ships, Cochrane attempted to cut the Portuguese line to engage the rearmost four ships before they could maneuver the van ships to prevent localized numerical inferiority. Cochrane signaled his squadron to follow him as he maneuvered Pedro I to cut the Portuguese line astern of the frigate Constituição and ahead of the Portuguese troopship Princesa Real. Pedro I opened fire on Princesa Real at noon, in anticipation the remainder of the Brazilian squadron would engage the other three Portuguese ships.

At that point the underpaid Portuguese sailors aboard the Brazilian ships demonstrated loyalty to Portugal rather than Brazil. Piranga, Nitherohy and Liberal failed to follow Pedro I into gunnery range of the Portuguese ships. Two Portuguese sailors assigned to the powder magazine aboard Pedro I imprisoned the powder boys sent to carry the gunpowder to reload the cannon. Only Maria da Glória, with a crew of Brazilians trained by their French Captain Beaurepaire, was effectively engaging the enemy. Cochrane successfully disengaged upon recognizing the inability to obtain even localized advantage; and prevented the Portuguese crew of Real from surrendering their Brazilian ship to the enemy.

Aftermath
Cochrane retired to Morro de São Paulo where he organized a blockade with Pedro I and Maria da Glória. The remaining Brazilian ships transferred their best sailors to the two blockading ships; and were left in the care of Captain Pio and men of unquestioned Brazilian loyalty. When Brigadier General Inácio Luís Madeira de Melo and his Portuguese soldiers left the capital on the morning of 2 July 1823, Cochrane pursued the fleet to Portugal, managing to capture seven ships during the chase. Salvador was taken by Brazilian troops joining the Empire of Brazil.

Brazil (First Admiral Thomas Alexander Cochrane)
Names of the ships involved followed by the number of cannons that ship had (when the number is known):
 * Pedro I (74) Flagship, Frigate Captain Thomas Crosbie
 * Maria da Glória (32) Captain Lieutenant Teodoro de Beaurepaire
 * Piranga (52) Captain of Sea and War David Jewett
 * Liberal (20) Captain Lieutenant Antônio Garcão
 * Guarani (16) Commander Antônio do Couto
 * Real (10) Commander Justino de Castro
 * Nitheroy (36) Frigate Captain John Taylor

Portugal (Chief of Division João Félix Pereira de Campos)
Names of the ships involved followed by the number of cannons that ship had (when the number is known):
 * Dom João VI (88) Flagship
 * Constituição (56)
 * Pérola (44)
 * Princesa Real (22)
 * Calypso (22)
 * Regeneração (22)
 * Activa (23)
 * Dez de Fevereiro (26)
 * Audaz (18)
 * São Gualter (26)
 * Príncipe do Brazil (22)
 * Restauração (24)
 * Conceição (6)