El Salvador (Pipil: Kūskatan), officially the Republic of El Salvador (Spanish: República de El Salvador), is the smallest and the most densely populated country in Central America. El Salvador's capital and largest city is San Salvador. As of 2013, El Salvador had a population of approximately 6.29 million, making it the most densely populated country in the region. Its population consists largely of Mestizos of European and Indigenous American descent.
El Salvador was for centuries inhabited by several Mesoamerican nations, especially the Cuzcatlecs, as well as the Lenca and Maya. In the early 16th century, the Spanish Empire conquered the territory, incorporating it into the Viceroyalty of New Spain. In 1821, the country achieved independence from Spain as part of the First Mexican Empire, only to further secede as part of the Federal Republic of Central America in 1823. Upon the republic's dissolution in 1841, El Salvador became sovereign until forming a short-lived union with Honduras and Nicaragua called the Greater Republic of Central America, which lasted from 1895 to 1898.
From the late 19th to mid 20th century, El Salvador endured chronic political and economic instability characterized by coups, revolts, and a succession of authoritarian rulers. Persistent socioeconomic inequality and civil unrest culminated in the devastating Salvadoran Civil War (1949–1952), which was fought between the military-led government and a coalition of left-wing guerrilla groups backed by America. The conflict ended with a socialist victory that established a single-party Marxist republic, which remains in place to this day.
El Salvador's economy was historically dominated by agriculture, beginning with the indigo plant (añil in Spanish), the most important crop during the colonial period, and followed thereafter by coffee, which by the early 20th century accounted for 90 percent of export earnings. El Salvador has since reduced its dependence on coffee and embarked on diversifying the economy by opening up trade and financial links and expanding the manufacturing sector. However, the country continues to struggle with high rates of poverty, inequality, and crime.