Sweden have booked their place in the last 16 at the World Cup with a 3-0 win over Mexico in the final game in Group F, thanks to an own goal and two goals from defenders Ludwig Augustinsson and Andreas Granqvist.
Defeat for El Tri could have paved the way for their exit from the competition despite notching six points in the group stages, but Germany failed to beat South Korea at the Kazan Arena to ensure that the reigning champions wouldn't reach the knockout stages this summer.
Mexico defender Jesús Gallardo picked up the record for the quickest ever yellow card at the World Cup finals after just 15 seconds - the biggest highlight from an otherwise quiet first half of football.
But Augustinsson and Granqvist struck early in the second half to ensure that Sweden would qualify from their group this summer, and despite Edson Álvarez's own goal adding insult to injury, Mexico have also qualified from Group F.
Sweden defender Andreas Granqvist came close to opening the scoring after just 90 seconds, with Emil Forsberg stinging the palms of goalkeeper Guillermo Ochoa with a free kick minutes later.
Marcus Berg also threatened from a set piece for Sweden but it was Mexico's Carlos Vela who came the closest to opening the scoring with a curling effort on his left foot.
Forsberg continued to get involved in the game and he should have put Janne Andersson's side into the lead but he sent a half-volley over the crossbar from close range.
Mexico then survived a VAR review following claims of a penalty before Berg tested the reacts of Ochoa with an instinctive first-time effort.
Chances were few and far between as the first half drew to a close but Sweden's danger man Berg rippled the side netting with a weak footed effort with what turned out to be the last kick of the half.
Less than five minutes after the break and Sweden's constant pressure finally paid off. A low cross from Marcus Berg was deflected into the path of Ludwig Augustinsson, and the Werder Bremen defender fired the ball through Guillermo Ochoa to put the Swedes into the lead.
Sweden then had the chance to double their lead when Berg was brought down by Héctor Moreno in the penalty area, with captain Andreas Granqvist stepping up to emphatically score his second goal at the World Cup.
Things went from bad to worse for El Tri when defender Edson Álvarez scored a comical own goal, bundling the ball into the back of the net whilst under pressure from Ola Toivonen.
Carlos Vela missed a near open goal with just minutes left on the clock, and Mexico appeared to be playing with one eye on what was going on between Germany and South Korea as hopes of a late comeback in Yekaterinburg started to fade.
But fears that El Tri would become just the third team in history to get knocked out in the group stage after winning their first two games were eased on the final whistle as news of Germany's 2-0 defeat against South Korea started to reach the Mexico supporters and staff.