In 1524, Spanish conquistadors led by Pedro de Alvarado arrived in El Salvador. The Spanish quickly conquered the Pipil and established their own colony. El Salvador became part of the Spanish Empire and was ruled by the Spanish for over 300 years.
In 1821, El Salvador gained its independence from Spain and joined the Federal Republic of Central America. However, the federation soon dissolved and El Salvador became an independent country in 1839.
Since independence, El Salvador has experienced a history of political instability and violence. The country has been ruled by a series of military juntas and dictators, and has been involved in several civil wars. In the 1990s, El Salvador finally achieved peace and democracy.