Mexico's chances remain somewhat slim, but El Tri secured a dramatic 2-1 win against Panama thanks to Raul Jimenez's late bicycle kick at the Azteca Stadium.
Earlier, Mexico had taken the lead when Hernandez found Oribe Peralta with a chipped pass and the Santos Laguna striker beat Panama goalkeeper Jaime Penedo. After the break, Chicha had a chance to double the advantage after Javier Aquino was felled in the area. Hernandez's hit his spot-kick straight down the middle, however, and Penedo saved easily.
Panama equalised with 10 minutes remaining to shock everybody inside the Azteca Stadium, but Jimenez's stunning late overhead kick from 17 yards sealed the points and took Mexico to fourth place in the CONCACAF group. Their passage to Brazil in 2014 will, at the very least, require a play-off.
Meanwhile, Antonio Valencia played a key role in Ecuador's win over 2010 semi-finalists Uruguay. The Reds winger provided an assist for the only goal of the game, crossing low for Jefferson Montero to tap home from two yards on 30 minutes.
Ecuador's victory puts them to within a point of automatic qualification for next summer's tournament. Valencia and his team-mates meet Chile, who have already secured qualification, on Tuesday in Santiago.