The War of Independence of Brazil was waged between the newly independent Brazilian Empire and United Kingdom of Portugal, Brazil and the Algarves which had just undergone the Liberal Revolution of 1820.It lasted from February 1822, when the first skirmishes took place, to March 1824 with the surrender of the Portuguese garrison in Montevideo. The war was fought on land and sea and involved both regular forces and civilian militia. Land and naval battles took place in the territories of Bahia, Cisplatina and Rio de Janeiro provinces, the vice-kingdom of Grão-Pará, and in Maranhão and Pernambuco, which today are part of Ceará, Piauí and Rio Grande do Norte states.