The history of El Salvador begins with 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 ruled from Mexico City. In 1821, the country achieved independence from Spain as part of the First Mexican Empire, only to further secede as part of the Federal of Central America two years later. Upon the republic's isolation 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.
In the 20th century, El Salvador had endured chronic political and economic instability characterized by coups, revolts, and a succession of authoritarian rulers caused by the intervention of the United States. Persistent socioeconomic inequality and civil unrest culminated in the devastating Salvadoran Civil War in the 1980s, which was fought between the military-led government and a coalition of left-wing guerrilla groups. The conflict ended in 1992 with a negotiated settlement that established a multiparty constitutional republic, which remains in place to this day.
El Salvador's economy was historically dominated by agriculture, beginning with the indigo plant, 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.
The culture of El Salvador is a Central American culture nation influenced by the clash of ancient Mesoamerica and medieval Iberian Peninsula. Salvadoran culture is influenced by Native American culture (Lenca people, Cacaopera people, Maya peoples, Pipil people) as well as Latin American culture (Latin America, Hispanic America, Ibero-America). Mestizo culture and the Catholic Church dominates the country. Although the Romance language, Castilian Spanish, is the official and dominant language spoken in El Salvador, Salvadoran Spanish which is part of Central American Spanish has influences of Native American languages of El Salvador such as Lencan languages, Cacaopera language, Mayan languages and Pipil language, which are still spoken in some regions of El Salvador.