The fleet arrived at Bahia on 22 December, and, finally, at Rio de Janeiro on 8 March 1808. The new Portuguese capital is established in Rio. Carried in the fleet, the Royal Academy of Midshipmen also arrives and is installed in Rio, as well as a part of the Royal Brigade of the Navy. In retaliation for the French invasion of Portugal, the Portuguese forces in Brazil conquer the French Guiana in January 1809. The amphibious invasion is done by a Portuguese naval flotilla supported by a British frigate, a force of 550 marines of the Royal Brigade of the Navy and 700 Brazilian regulars. While participating in the Napoleonic Wars in the Western hemisphere, the Portuguese Navy was also engaged in operations in the waters of Southeast Asia. Between November 1809 and February 1810, the Portuguese naval forces based in Macau conduct a campaign against the Chinese pirates, defeating them in a series of naval actions in Bocca Tigris. Political instability dominated Portugal during the 19th century after the Napoleonic invasions. In 1820, after a Revolution in the city of Oporto, the Constitutional regime is established in Portugal. The Parliament in Lisbon requires the return of the King from Brazil to Europe. King John VI returns in 1821, leaving his heir, Prince Peter, as regent of Brazil. After a period of political dispute with the Parliament in Lisbon, Prince Peter finally breaks with it and declares the independence of Brazil in 1822, becoming its first Emperor, as Peter I. Peter I is supported by many of the Portuguese naval personnel stationed in Brazil, whose members became citizens of the new country. The new Brazilian Navy is constituted mainly with the Portuguese ships based in Brazil at that time and their respective crews. In the brief War of Independence of Brazil, some small naval engagements occur, between the Brazilian Navy and the Portuguese naval forces in Brazil that kept loyal to the Government of Lisbon. However, the engagements are limited by the fact that the Portuguese that constituted the majority of the crews of the Brazilian ships—although loyal to Peter I—refused to fight against other Portuguese. The conflict would end in 1824, with Portugal recognizing the independence of Brazil in 1825. In the same year, the Royal Academy of Midshipmen in Rio de Janeiro is divided in two, one for Brazil and the other for Portugal, with the students and