Frank Velasquez, voted the competition's Most Valuable Player, gave the Cuscatlecos a second-minute lead and Walter Torres made it 2-0 five minutes later.
Agustin Ruiz closed El Salvador's goal account three minutes into the second period, before Spain started to rally. One minute later, Jose Cintas scored for the visitors and Llorenç Gomez cut the deficit to one goal with nine minutes left on the clock.
In the day's opener, Paraguay reinforced its championship credentials with a 7-3 victory over Costa Rica, which finished winless in three games. Pedro Moran scored three goals in a winning effort, helping Paraguay complete its trip to Central America with a perfect 3-0-0 record.