Mexico winger Hirving Lozano took advantage of an awful mix-up in the Russian defence to score an extraordinary goal which gave his side a 2-1 win and knocked the Confederations Cup hosts out of the tournament on Saturday.
Russia goalkeeper Igor Akinfeev completely mis-read the situation after Hector Herrera sent a looping clearance 80 metres downfield from the edge of the Mexican area seven minutes into the second half.
The ball bounced once about 25 metres from the Russian goal and, as Akinfeev and his defence dallied, Lozano bravely nipped in to head the ball over the goalkeeper from the edge of the area to send the CONCACAF champions into the semi-finals.
Russia had raised the hopes of their fans by taking a first-half lead through Alexander Samedov but were quickly pegged back by Nestor Araujo's equaliser on the half hour.
Russia's early exit from was another setback for next year's World Cup hosts who also went out of last year's European Championship at the group stage, when they failed to win a game and were regarded by many as the worst team in the tournament.
Russia's afternoon was completed in the 68th minute after Yury Zhirkov was sent off for elbowing and they were only saved further embarrassment by the video assistant referee who disallowed a third Mexican goal for offside.
The video replay was also used in the 17th minute after Russian forward Fedor Smolov went down in the box after he appeared to come into contact with Araujo but the referee ruled against a penalty.
Mexico dominated possession early on but Russia went ahead fortuitously when Samedov beat goalkeeper Guillermo Ochoa just inside the far post after Mexico had failed to clear a header and midfielder Aleksandr Erokhin missed the ball as he was trying to shoot.
Mexico defender Nestor Araujo equalised in the 30th minute with a looping header.
The crowd seemed to sense that Russia had missed their chance and Lozano's freak equaliser confirmed their worst fears.
Mexico finished second in Group A on seven points, behind Portugal on goal difference. Russia were third with three.
Russia coach Stanislav Cherchisov, a former national team goalkeeper, backed Akinfeev.
"Every goalkeeper is entitled to commit mistakes and it is something you have to live with," he told reporters. "Life will go on, this is sport and I am convinced he will remain on the national team and make his fans happy.
"Passions are running high so it's not the time to come to any conclusions," he added. "I hope the players will use the experience to grow and develop."