Uruguay is a country in South America, bordering the South Atlantic Ocean, between Argentina and Brazil. In the 1680s the Portuguese established the first European settlement, followed by a Spanish settlement in the 1720s. By the 1770s Spain had gained control of the area, but in the 1820s Portugal once again came to power, annexing Uruguay to Brazil. Uruguay declared independence from Brazil in 1825 but decided to adhere to a regional federation with Argentina. The regional federation defeated Brazil after a three-year war, and in 1828 Uruguay became an independent state. The remainder of the 19th century saw the newly independent Uruguay undergoing a prolonged conflict between two political factions - the land-owning Blancos and the urban Colorados. Political unrest resurfaced in the 1960s caused in part by economic depression, leading to the military rule of the country in 1973 until civilian rule was restored in 1985. The left-wing Broad Front coalition came to power in the 2004 elections, effectively ending 170 years of political control previously held by the Colorado and Blanco parties. Former leftist guerrilla Jose Mujica who belongs to the Broad Front coalition won in the presidential elections in 2009. Uruguay's economy is based on agriculture, services and light manufacturing, with a high dependence on export-oriented agriculture, especially livestock. But heavy dependence on livestock export, and extensive economic linkages to its larger neighbors and major trading partners – Argentina and Brazil -- made Uruguay vulnerable to adverse external shocks. Uruguay is now recovering from the severe economic recession in 2002 caused by recessions in Brazil and Argentina.