The Spanish conquest of El Salvador was the campaign undertaken by the Spanish conquistadores against the Late Postclassic Mesoamerican polities in the territory that is now incorporated into the modern Central American nation of El Salvador. El Salvador is the smallest country in Central America, and is dominated by two mountain ranges running east-west. Its climate is tropical, and the year is divided into wet and dry seasons. Before the conquest the country formed a part of the Mesoamerican cultural region, and was inhabited by a number of indigenous peoples, including the Pipil, the Lenca, the Xinca, and Maya. Native weaponry consisted of spears, bows and arrows, and wooden swords with inset stone blades; they wore padded cotton armour.
The Spanish conquistadores were largely volunteers, receiving the spoils of victory instead of a salary; many were experienced soldiers who had already campaigned in Europe. The Spanish expeditions to Central America were launched from three different Spanish jurisdictions, resulting in rival conquests by mutually hostile Spanish captains. Spanish weaponry included swords, firearms, crossbows and light artillery. Metal armour was impractical in the hot, humid climate of Central America and the Spanish were quick to adopt the quilted cotton armour of the natives. The conquistadors were supported by a large number of Indian auxiliaries drawn from previously encountered Mesoamerican groups.
The first campaign against the native inhabitants was undertaken in 1524 by Pedro de Alvarado. Alvarado launched his expedition against the Pipil province of Cuscatlan from the Guatemalan Highlands, but by July 1524 he had retreated back to Guatemala. Gonzalo de Alvarado founded San Salvador the following year, but it was eradicated by a native attack in 1526, during a general uprising that spread across the region. Pedro de Alvarado returned to campaign in El Salvador in 1526 and 1528, and in the latter year, Diego de Alvarado reestablished San Salvador and issued encomiendas to his supporters. In 1528, the uprising finally ended when the Spanish stormed the native stronghold at the Peñol de Cinacantan.
In 1529, El Salvador became embroiled in a jurisdictional dispute with neighbouring Nicaragua. Pedrarias Dávila sent Martín de Estete at the head of an expedition to annex the territory to Nicaragua. Estete captured the leader of a rival Spanish expedition in eastern El Salvador, and marched on San Salvador, before being repulsed by a relief force sent from Guatemala. In 1530, Pedro de Alvarado ordered the establishment of a new settlement at San Miguel, in the east of the country, to protect against further incursions from Nicaragua, and to assist in the conquest of the surrounding area. Indigenous uprisings against the invaders continued, spreading from neighbouring Honduras. The general uprising across the two provinces was put down by the end of 1538, and by 1539 the province was considered pacified. The conquistadores discovered that there was little gold or silver to be found in El Salvador, and it became a colonial backwater with a small Spanish population, within the jurisdiction of the Captaincy General of Guatemala.