Colombia ( /kəˈlʌmbiə/ kə-LUM-biə, or /kəˈlɒmbiə/ kə-LOM-biə), officially the Republic of Colombia (Spanish: República de Colombia ), is a unitary constitutional republic comprising thirty-two departments. The country is located in northwestern South America, bordered to the northwest by Panama; to the north by the Caribbean Sea; to the east by Venezuela and Brazil; to the south by Ecuador and Peru; and to the west by the Pacific Ocean. Colombia is the 26th largest country by area and the fourth largest in South America after Brazil, Argentina and Peru. With over 46 million people, Colombia is the 27th largest country in the world by population and has the second largest population of any Spanish-speaking country in the world, after Mexico. Colombia is a middle power, and is now the fourth largest economy in Latin America, and the third largest in South America. Colombia produces coffee, flowers, emeralds, coal, and oil. These products comprise the primary sector of the economy.
The territory of what is now Colombia was originally inhabited by indigenous peoples including the Muisca, Quimbaya, and Tairona. The Spanish arrived in 1499 and initiated a period of conquest and colonization ultimately creating the Viceroyalty of New Granada (comprising modern-day Colombia, Venezuela, Ecuador, north-western Brazil and Panama), with its capital at Bogotá. Independence from Spain was won in 1819, but by 1830 "Gran Colombia" had collapsed with the secession of Venezuela and Ecuador. What is now Colombia and Panama emerged as the Republic of New Granada. The new nation experimented with federalism as the Granadine Confederation (1858), and then the United States of Colombia (1863), before the Republic of Colombia was finally declared in 1886. Panama seceded in 1903. Colombia was the first constitutional government in South America, and an important promoter of the Pan American organizations, initially through the Congress of Panama and later as founder of the Organization of American States. The Liberal and Conservative parties, founded in 1848 and 1849, are two of the oldest surviving political parties in the Americas.
Colombia is ethnically diverse. The interaction between descendants of the original native inhabitants, Spanish colonists, Africans brought as slaves and twentieth-century immigrants from Europe and the Middle East has produced a varied cultural heritage. This has also been influenced by Colombia's varied geography. The majority of the urban centres are located in the highlands of the Andes mountains, but Colombian territory also encompasses Amazon rainforest, tropical grassland and both Caribbean and Pacific coastlines. Ecologically, Colombia is one of the world's 17 megadiverse countries, and is considered the most megadiverse per square kilometer.
Tensions between political parties have frequently erupted into violence, most notably in the Thousand Days War (1899–1902) and La Violencia, beginning in 1948. Since the 1960s, government forces, left-wing insurgents and right-wing paramilitaries have been engaged in the continent's longest-running armed conflict. Fueled by the cocaine trade, this escalated dramatically in the 1980s. Since 2010 the violence has decreased, with some paramilitary groups demobilising as part of a controversial peace process and the guerrillas losing control of much of the territory they once dominated. Meanwhile Colombia's homicide rate almost halved between 2002 and 2006. Due to eradication policies, as of June 2012, Colombia, for many years the world's largest producer of cocaine, is now widely considered to rank second or third, though some sources still consider it first. The United States of America are still the largest consumer of this drug, with a 150 to 160 tons per year.