It was McCleary’s second goal of the tournament. Jobi McAnuff’s shot from distance forced a diving save by Derby Carrillo, but McCleary was left unmarked in front of goal for an easy finish.
Jamaica is unbeaten in seven of its last eight Gold Cup matches and will play Haiti in the quarterfinals.
El Salvador played a quick corner kick in the second minute of stoppage time, but goalkeeper Ryan Thompson got a hand on Pablo Punyed’s glancing header. Dustin Corea’s close-range rebound attempt hit the side netting.
Jamaica’s Jermaine Taylor was injured in the opening minutes of the game on a challenge with Andres Flores. Then, goalkeeper Dwayne Miller was carried off in the 23rd minute after taking an unintentional hit to the head by Punyed. Miller was replaced by Thompson.
Darren Mattocks was sent off in the 81st minute after receiving his second yellow card for Jamaica.