The war was fought across various regions of Brazil, including Bahia, Maranhão, Pará, Piauí, and Cisplatina (present-day Uruguay), with naval battles occurring along the Atlantic coast.
Brazilian forces, consisting of regular troops, local militias, and a hastily assembled fleet, defeated the Portuguese garrisons to establish the Empire of Brazil under emperor Pedro I.
After the outbreak of the Liberal Revolution in 1820, which forced king John VI to return to Portugal in 1821 after more than a decade in Rio de Janeiro, tensions between local Brazilian elites and the Portuguese Cortes arose.
Northern provinces, such as Bahia, Maranhão, and Pará, which maintained stronger ties with Portugal than the government in Rio de Janeiro, resisted Brazilian sovereignty, with Portuguese garrisons keeping control of key cities such as Salvador, São Luís, Belém, and Montevideo, in the South.
In turn, the Imperial Navy disrupted Portuguese supply lines, prevented the arrival of reinforcements from Europe, and captured several enemy vessels.
The conflict officially ended with the Treaty of Rio de Janeiro, mediated by the United Kingdom, in which Brazil committed to paying Portugal an indemnity of 2 million pounds and grant trade privileges to Britain.
Fights between Portuguese soldiers and local militias broke out in the streets of the main cities in 1822[8] and quickly spread inland, despite the arrival of reinforcements from Portugal.
[10] Pedro I, with the guidance of José Bonifácio de Andrada e Silva as chief minister, assembled a constituent congress for Brazil appealing to the constitutionalist sentiments amongst independence-minded Brazilians.
This gesture was enough to persuade the Cortes in Lisbon to negotiate exclusive terms of trade in recognition of their independence, which was met with ridicule from Pedro.
By the war's end, Bahia would see the most extensive combat throughout the conflict,[11] but at this time its influence was paramount to the Portuguese effort for securing political interests in surrounding regions.
Outnumbered across a vast territory, the Portuguese were forced to restrict their sphere of action to the provincial capitals along the shore that represented the country's strategic sea ports, including Belém, Montevideo, Salvador and São Luís.
The Brazilian agent in London, Felisberto Caldeira Brant, the Marquis of Barbacena, received orders to acquire warships fully equipped and manned on credit.
But by 1823 the navy had been reformed and the Portuguese members were replaced by native Brazilians, freed slaves, pardoned prisoners as well as more experienced British and American mercenaries.
Under British pressure, Portugal eventually agreed to recognize Brazil's independence in 1825, thus allowing the new country to establish diplomatic ties with other European powers.
The second act of recognition was materialized in a Treaty of Peace signed in Rio de Janeiro on 29 August 1825, by means of which Portugal again recognized the independence of Brazil.
Thus, by a separate convention that was signed on the same occasion as the Treaty on the Recognition of Independence, Brazil agreed to pay Portugal two million pounds in damages.
With the loss of its only territory in the Americas and a significant portion of its income, Portugal quickly turned its attention to increasing the commercial productivity of its various African possessions (mainly Angola and Mozambique).