José Gervasio Artigas launched a successful revolt against Spain in 1811 and in formed the Liga Federal in 1814, of which he was declared Protector. The steady growth of the influence and prestige of the Liga Federal frightened the Portuguese government, which did not want the League’s republicanism to spread to the Portuguese colony of Brazil. In 1816, Portuguese forces invaded the Eastern Province of the Río de la Plata (present-day Uruguay) and occupied Montevideo in 1817. After struggling for three years in the countryside, they defeated Artigas.
Brazil annexed the Eastern Province of the Rio de la Plata under the name of Provincia Cisplatina. Supported by the United Provinces of the Río de la Plata (present-day Argentina), a militant revolutionary group, led by Juan Antonio Lavalleja, declared independence in 1825. This led to the 500-day Cisplatine War, resulting in the Treaty of Montevideo in 1828, giving birth to Uruguay as an independent state.