In 1776, the new Viceroyalty of the Río de la Plata was established with its capital in Buenos Aires and it included the territory of Banda Oriental. In 1816, Portugal conquered Banda Oriental from Spain and incorporated the territory into the United Kingdom of Portugal, Brazil and the Algarves and it became the Cisplatina province within Brazil. In 1824, after the Siege of Montevideo, Banda Oriental became an integral part of independent Brazil. In 1825, the newly named Uruguay became an independent nation.