Mexico sealed their place in the World Cup with a 9-3 aggregate win over New Zealand in the play-offs after winning the second leg 4-2 in Wellington.
The tie was all but over after a and Oribe Peralta ended any doubt with a first-half hat-trick, having scored a brace in the home game.
Chris James, formerly of Barnet, and St Johnstone's Rory Fallon gave the All Whites some consolation late on.
But Mexico's Carlos Pena had the last word with three minutes left.
Mexico had struggled in their qualifying group, winning just twice in 10 games, and Miguel Herrera last month became their fourth manager in six weeks.
Herrera is now scheduled to return to club side Club America while Mexico decide whether the 45-year-old or someone else will lead them at the World Cup.
That Mexico even made the play-offs was extremely fortunate. With seconds left of the entire Confederation of North, Central American and Caribbean Association Football qualifying campaign, Panama were beating United States 2-1 in injury-time, but the US scored twice to eliminate Panama and send Mexico into the inter-continental play-off.
New Zealand, who reached the last World Cup, topped their Oceania qualifying table with six wins from six but no team from that continent qualify directly and they had to face the fourth-placed team in Concacaf - Mexico.
Mexico are the 31st team to reach the World Cup, with only Uruguay yet to confirm their place. They play Jordan in the second leg of their play-off on Wednesday, having won the opening clash 5-0.