Lionel Messi rescued Argentina from the brink of World Cup elimination, scoring the crucial opening goal in a 2-0 win over Mexico at Lusail Iconic Stadium to put the South American champions back on track to reach the last 16.

Argentina were being frustrated by a stubborn, physical Mexico side until Messi produced a moment of magic, firing the ball low into the corner of the net from 20 yards in the 64th minute.

With the deadlock broken and space finally starting to open up, Enzo Fernandez curled in a brilliant first goal for his country in the 87th minute to ensure the vital three points.

Stream on ESPN+: LaLiga, Bundesliga, more (U.S.)

After a stunning 2-1 loss to Saudi Arabia in their opener on Tuesday, Argentina knew that another defeat against Mexico would see them eliminated from the competition while a draw would leave their hopes hanging by a thread.

But thanks to two moments of magic from Messi and Fernandez, one of the pre-tournament favorites will go into their final Group C match in second place, one point behind their next opponents Poland.

A win would be enough to guarantee their progress to the knockout stages, while a draw could be sufficient depending on the result of the other remaining game.

World Cup 2022: How every team can reach the last 16

Mexico, who again offered precious little going forward, have just a single point from their first two games following an opening goalless draw with Poland. El Tri will need to beat Saudi Arabia on Wednesday to stand a chance of finishing in the top two.

“It was a complicated game to lift ourselves up for, because Mexico played really well,” Messi told Argentine TV. “In the first half, we played with intensity and in the second half, we calmed down a bit and we came back to ourselves.

“We knew that today we had to win, that another World Cup started for us and we knew what to do. We cannot let our guard down now. We have all finals left to play we cannot err. We knew that the response from our fans would be like this and I think we complied. We have been all hand in hand together for a long time.”