El Salvador, officially the Republic of El Salvador, is a country in Central America. It is bordered on the northeast by Honduras, on the northwest by Guatemala, and on the south by the Pacific Ocean. El Salvador's capital and largest city is San Salvador. As of 2018, the country had a population of approximately 6.42 million.
For millennia, the region was controlled by several Mesoamerican nations, especially Lenca, Mayans, then later the Cuzcatlecs. Archaeological monuments also suggest an early Olmec presence around the first millennium BC. In the beginning of the 16th century, the Spanish Empire conquered the Central American territory, incorporating it into the Viceroyalty of New Spain ruled from Mexico City. However the Viceroyalty of Mexico had little to no influence in the daily affairs of the isthmus, which was colonized in 1524. In 1609, the area was declared the Captaincy General of Guatemala by the Spanish, which included the territory that would become El Salvador until its independence from Spain in 1821. It was forcefully incorporated into the First Mexican Empire, then later seceded, joining the Federal Republic of Central America in 1823.