The Portuguese Royal Court and Government install themselves in Brazil from 1808, with Rio de Janeiro becoming the "de facto" capital of the Portuguese Empire. In 1815, Brazil is raised to the status of Kingdom, with the whole Portuguese Monarchy becoming the United Kingdom of Portugal, Brazil and the Algarves. As a retaliation against the Napoleonic invasion of the Portugal, the Portuguese forces in Brazil invaded and conquered the French Guiana in 1808. In 1811, the Portuguese Army in Brazil invaded the Banda Oriental (present-day Uruguay), to retake Portuguese claimed territories that were under Spanish occupation. In 1816, the Portuguese forces invaded again the Banda Oriental, defeating the forces of Artigas in a series of battles. Banda Oriental is then annexed to the Portuguese Crown as the Brazilian Cisplatine Province. After the declaration of the Independence of Brazil in September 1822, by the Portuguese Prince heir Peter, the Portuguese Army fought the brief Brazilian War of Independence. This war assumed a character of a kind of a civil war, with the forces loyal to the Portuguese Government fighting the separatist army whose leaders and officers were also mostly Portuguese. By 1823, the resistance of the Portuguese loyal forces was concentrated in some coastal cities, especially those of Salvador of Bahia and Montevideo (presently the capital of Uruguay), all under siege of the Brazilian separatist forces. Despite repelling successive attacks by the superior Brazilian forces, but with no perspectives of receiving reinforcements, the Portuguese garrison of Salvador, under the command of General Madeira de Melo, evacuated the city and embarked in a Portuguese naval squadron, sailing to Portugal in July 1823. The Portuguese garrison of Montevideo was the last to resist in Brazil, only surrendering to the Brazilian forces (ironically, commanded by the Portuguese General Carlos Lecor) on 8 March 1824.