YEKATERINBURG, Russia (AP) -- It was a surreal atmosphere at the end of Mexico's World Cup game against Sweden.
In the dying minutes, the Mexican fans -- who well outnumbered the Swedes in the packed arena -- erupted in wild celebrations.
Plastic cups and beer were flying high as the fans were jumped and danced and sang.
It was the kind of celebrating supporters from the soccer crazy country would do for a World Cup victory by El Tri.
But this was different. Mexico was trailing Sweden 3-0 on Wednesday and moments earlier the mood of the Mexicans had been bleak.
Yet the feelings of joy were genuine and spontaneous.
With Mexico's chances of advancing to the knockout stage under dire threat, the fans had turned their attention from the pitch in Yekaterinburg to their smart phones to watch the simultaneous game in Kazan.
In a wide open Group F, all they could hope was an upset result in the other match featuring defending champion Germany against South Korea. Mexico fans were hoping for a shocking upset -- and the South Koreans delivered that with two goals in stoppage time for a 2-0 victory.
That result sent the Mexican squad into the knockout round along with Sweden, despite their loss on Wednesday.
"We advanced to second phase, and thanks to Korea!" said Mexico City resident Edmundo Robert, who was at the game with his son and father of law. "Yes, it was sweet. A victory is sweet -- and this is a kind of a strange victory."
Groups of Mexicans were still chanting "Korea, Korea," as they left the arena.
Jose Alcocer was jumping with friends in a circle long after the match, chanting: "Bye-bye Germany."
"We lost but we're in the next round," Alcocer said, "So, we're very happy."
Mexico has reached the round of 16 for the seventh straight World Cup, but this one will long be remembered.
"I never felt such happiness," said Carlos Preciado, a Mexican who lives in San Francisco." I cannot explain this happiness that exploded in one second. I never felt like that. Honestly, it was the best celebration of a Korean goal. It was the best thing, we just passed to the next round, and the World Cup champion is out."
Germany became the fourth defending champion in the last five tournaments to be eliminated in the group stage, finishing with a one win -- in stoppage time against Sweden -- and losses to Mexico and South Korea.
Mexico next faces the winner of Group E and, Alcocer concedes, "We have to more careful about everything."