Javier Hernandez, Chicharito
Javier Hernandez, also known as “Chicharito,” celebrates after Mexico defeats South Korea at the 2018 World Cup. Photo by Svetlana Beketova/Wiki Commons/soccer.ru

Mexico lost to Sweden 3-0 in group finals Wednesday but was still able to advance to the knockout round on Germany’s loss to South Korea.

It looked hopeless for Mexico in stoppage time, trailing Sweden 3-0, until South Korea, playing for pride, scored in the 94th minute. Kim Yong-gwon’s goal was initially ruled as off-side but a Video Assistant Referee overturned the decision sending Mexico to the round of 16.

Mexico has reached the knockout round each of the last six World Cups, then lost in the round of 16 each time. Germany, however, was eliminated for the first time since 1954. It was the defending champ’s worst World Cup performance ever.

Sweden broke the deadlock five minutes into the second half after finishing the first half goalless. Ludwig Augustinsson scored on a volley, making it 1-0, Sweden. Eighteen minutes later, just after the 60-minute mark, captain Andreas Granqvist doubled the lead with a penalty kick.

Sweden’s third goal came from Mexico defender Edson Álvarez, who tried to clear a cross but the ball bounced off his hand and bounced into the back of his own net. That secured Sweden’s place in the knockout round.

About 15 minutes later, Kim gave Mexico a gift and Mexico fans in the stands, checking the score on their phones, cheered.

The final games in each group in the World Cup are played simultaneously in an attempt to avoid collusion.

The rule was adopted for the 1986 World Cup after West Germany and Austria appeared to arrange a 1-0 West German victory that would let both teams advance to the second round in the 1982 tournament.

Mexico is 15th in the rankings compiled by FIFA, soccer’s international governing body. Sweden is ranked 24th.