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 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.
who did el salvador get their independence from
Federal Republic of Central America