Panama City government
The steady growth of influence and prestige of the Federal League frightened the Portuguese government, which did not want the League's republicanism to spread to the adjoining Portuguese colony of Brazil. In August, 1816 forces from Brazil invaded the Eastern Province, with the intention of destroying the protector and his revolution. The Portuguese forces, thanks to their numerical and material superiority, occupied Montevideo on January 20, 1817, and finally after struggling for three years in the countryside, defeated Artigas in the Battle of Tacuarembó. In 1821, the Eastern Province of the Río de la Plata (present-day Uruguay), was annexed by Brazil under the name of Província Cisplatina. In response, the Thirty-Three Orientals led by Juan Antonio Lavalleja declared independence on August 25, 1825 supported by the United Provinces of the Río de la Plata, present-day Argentina.
This led to the 500-day Cisplatine War. Neither side gained the upper hand, and in 1828 the Treaty of Montevideo, fostered by Britain, gave birth to Uruguay as an independent state. The nation's first constitution was adopted on July 18, 1830. For the remainder of the 19th century, under a series of elected and appointed presidents, Uruguay saw interventions by — and conflicts with — neighboring states, political and economic fluctuations, and large inflows of immigrants, mostly from Europe.