. Mexico stunned the United States 3-2 to qualify for the 2017 Confederations Cup here on Saturday as a spectacular extra-time winner from Paul Aguilar settled a five-goal thriller at the Pasadena Rose Bowl.

Aguilar lashed in a superb volley in the 118th minute to spark euphoric scenes at the iconic venue in front of 93,723 fans.

Aguilar’s goal sends Mexico to Russia as CONCACAF’s representatives in 2017 and piles pressure on US coach Jurgen Klinsmann who has faced criticism for a string of poor recent results.

But the victory capped a remarkable temporary stint as Mexico manager Ricardo Ferretti, who took the job on a temporary, unpaid basis following the sacking Miguel Herrera in July.

“I feel very happy for the boys and what we did together,” said the Brazilian-born Ferretti, a naturalised Mexican citizen.

“I think in the end we did just a little bit more than them and deserved to win.”

A downcast Klinsmann meanwhile said he would soldier on despite this latest setback, which followed elimination in the Gold Cup semi-finals in July and a heavy defeat to Brazil last month.

“Defeat is always difficult to swallow,” Klinsmann said.

“The guys showed a lot of character, tremendous effort, they gave everything they had,” he added. “I told the guys ‘Heads up, because you gave everything you had.'”

Klinsmann’s men looked to have done enough to take the game to penalties, twice coming from behind to level the score on a night of high drama that saw three goals in extra-time after the match finished 1-1 after 90 minutes.

Oribe Peralta looked to have settled the game with a 96th-minute strike that put Mexico 2-1 up on the night, ramming home Aguilar’s low cross.

But the United States snatched an equaliser out of nowhere in the 108th minute when Bobby Wood sprinted onto DeAndre Yedlin’s through ball to slip a cool finish beneath Moises Munoz to make it 2-2.

The extra-time drama followed a fractious 90 minutes where Mexico were unable to convert their territorial and technical superiority into goals.

Javier Hernandez opened the scoring in the 10th minute

Bayer Leverkusen striker Javier Hernandez fired Mexico into the lead after only 10 minutes as the visitors carved open the American defence with a superb piece of passing football.

A sublime backheeled flick from Benfica’s Raul Jimenez released Peralta into space down the right flank and the Club America forward’s low cross was met by Hernandez with a nice finish.

But Klinsmann’s men responded strongly to the early setback, swiftly marching back up the field to level within five minutes.

Skipper Michael Bradley was the architect, his pinpoint inswinging freekick from wide on the left picking out unmarked Stoke City defender Geoff Cameron who thumped his header past Munoz.

The early goals lit the touchpaper for a feisty opening spell, with Aguilar earning a booking for a brutal challenge on Jermaine Jones that saw Klinsmann leap off the bench in anger in the 21st minute.

Tempers boiled over in the 34th minute when Peralta flew in as Brad Guzan gathered a loose ball, triggering a prolonged melee in the US goalmouth.

Peralta was shown yellow for his role in the altercation. The US created the better of the chances thereafter, Jozy Altidore scooping a shot over the bar from close range on 40 minutes before Bradley forced a scrambled Munoz save from a freekick shortly before half-time.

Yet the momentum built by the US evaporated in the second half, with Mexico’s superior technicians spending long periods camped in American territory, readily taking advantage of a US tendency to surrender possession cheaply.

Mexico struggled to break down a packed US defence for the remainder of the 90 minutes however setting up 30 minutes of extra-time.