Uruguay (/ˈjʊərəɡwaɪ/; Spanish: [uɾuˈɣwai]), officially the Eastern Republic of Uruguay (Spanish: República Oriental del Uruguay), is a country in the southeastern region of South America. It is bordered by Argentina to its west and Brazil to its north and east, with the Atlantic Ocean to the south and southeast. Uruguay is home to 3.3 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 4000 years before the Portuguese invaded. Portugal established Colonia del Sacramento, one of the oldest European settlements in the country, in 1680. 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, lack of corruption, quality of living, e-Government, and equally first in South America when it comes to press freedom, size of the middle class, prosperity and security. On a per capita basis, Uruguay contributes more troops to United Nations peacekeeping missions than any other country. 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, the only one in Latin America. Uruguay is also the 3rd best ranked in the world in e-Participation. Uruguay is an important global exporter of combed wool, rice, soybeans, frozen beef, malt and milk.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 performing well globally on personal rights, tolerance and inclusion issues.