The first Europeans arrived in the area in the early 16th century. Both Spain and Portugal pursued the colonization of Uruguay, with the Spanish eventually gaining control. The future capital, Montevideo, was founded in the early 18th century and became a rival to Buenos Aires across the Río de la Plata. Montevideo, however, was thought of as a military center for the Spanish empire, while Buenos Aires was a commercial center.
In the early 19th century, independence movements sprung up across South America, including Uruguay (then known as the Banda Oriental, or "Eastern Strip", referring to the area east of the Uruguay river). Uruguayan territory was contested between the nascent states of Brazil and Argentina. Brazil annexed the area in 1821 under the name of Provincia Cisplatina, but a revolt began on August 25, 1825, after which Uruguay became an independent country with the Treaty of Montevideo in 1828.
The original population of Charrúa Indians was gradually decimated over three centuries, culminating on 11 April 1831 in a mass killing at Salsipuedes, which was led by General Fructuoso Rivera, Uruguay's first president. After that date the few remaining Charrúas were dispersed and a viable Charrúa culture was a thing of the past, although Charrúa blood still runs in the veins of many Uruguayans today as a result of extensive Charrúa-Spanish intermixing during colonial times. Four Charrúas - Senaqué, the leader Vaimaca Pirú, the warrior Tacuabé and his wife Guyunusa - were taken to Paris in 1833 to be displayed as circus attractions.
In the latter part of the 19th century, Uruguay participated in the War of the Triple Alliance against Paraguay.
Uruguay then experienced a series of elected and appointed presidents and saw conflicts with neighboring states, political and economic fluctuations and modernization, and large inflows of immigrants, mostly from Europe. The work of President José Batlle y Ordóñez made Uruguay an advanced nation with a complex welfare system; for most of the 20th century Uruguay was on par with European nations. Due to its advanced social system and its stable democracy, Uruguay came to be known as "the Switzerland of the Americas".
The Uruguayan economy relies largely on agricultural exports. The world wars brought prosperity as Uruguayan beef and grain went to feed a war-ravaged Europe. World food prices dropped precipitously following the end of WWII, which triggered years of decline for the Uruguayan economy. By the 1960's, the stable social system began to break down as the economy spiralled. The government started losing popular support as students, workers and lower-class families felt the pain of an economy unable to adapt to a post-agricultural world economy. The Tupamaros, a radical marxist-leninist group, responded to the crisis with violence, which triggered government repression that ended with the suspension of individual rights by the president, Jorge Pacheco Areco, and his successor, Juan María Bordaberry. Finally, in 1973, the army seized power, ushering in 11 years of military dictatorship in what was once one of the most stable democracies in the region. In 1984, democracy was finally restored with the election of Julio María Sanguinetti.