Uruguay, officially the Oriental Republic of Uruguay, is a sovereign state in the southeastern region of South America. It borders Argentina to its west and Brazil to its north and east, with the Río de la Plata (River of Silver) to the south and the Atlantic Ocean to the southeast. Uruguay is home to an estimated 3.44 million people, of whom 1.8 million live in the metropolitan area of its capital and largest city, Montevideo. With an area of approximately 176,000 square kilometres (68,000 sq mi), Uruguay is geographically the second-smallest nation in South America, after Suriname. Uruguay was inhabited by the Charrúa people for approximately 4,000 years before the Portuguese established Colonia del Sacramento in 1680, meaning that Uruguay began to be colonized by Europeans relatively late compared with neighboring countries. Montevideo was founded as a military stronghold by the Spanish in the early 18th century, signifying the competing claims over the region. Uruguay won its independence between 1811 and 1828, following a four-way struggle between Spain, Portugal, Argentina and Brazil. It remained subject to foreign influence and intervention throughout the 19th century, with the military playing a recurring role in domestic politics until the late 20th century. Modern Uruguay is a democratic constitutional republic, with a president who serves as both head of state and head of government. Uruguay is ranked first in Latin America in democracy, peace, low perception of corruption, e-government, and is first in South America when it comes to press freedom, size of the middle class and prosperity. On a per-capita basis, Uruguay contributes more troops to United Nations peacekeeping missions than any other country. It tops the rank of absence of terrorism, a unique position within South America. It ranks second in the region on economic freedom, income equality, per-capita income and inflows of FDI. Uruguay is the third-best country on the continent in terms of HDI, GDP growth, innovation and infrastructure. It is regarded as a high-income country (top group) by the UN. Uruguay is also the third-best ranked in the world in e-Participation. Uruguay is an important global exporter of combed wool, rice, soybeans, frozen beef, malt and milk. Nearly 95% of Uruguay's electricity comes from renewable energy, mostly hydroelectric facilities and wind parks. The Economist named Uruguay "country of the year" in 2013, acknowledging the innovative policy of legalizing the production, sale and consumption of cannabis. Same-sex marriage and abortion are also legal, leading Uruguay to be regarded as one of the most liberal nations in the world, and one of the most socially developed, outstanding regionally, and ranking highly on global measures of personal rights, tolerance, and inclusion issues.