With less than 20 minutes remaining, Egypt looked set to script one of the biggest upsets in World Cup history, leading 2-0 as defending champions Argentina stared at a shock exit.

However, a dramatic late surge ensured Lionel Messi's World Cup journey continued.

Egypt stun defending champions

Egypt seized control of the contest through Yasser Ibrahim's 15th-minute strike before Mostafa Ziko doubled the advantage in the 67th minute.

Earlier, Messi had squandered a golden opportunity after his penalty was saved by goalkeeper Mostafa Shobeir.

Argentina's remarkable comeback

Facing elimination, Argentina responded in sensational fashion. Cristian Romero sparked the revival with a header in the 79th minute before Messi restored parity four minutes later.

Enzo Fernández then completed the turnaround with a dramatic stoppage-time winner in the 92nd minute.

Refereeing controversy dominates talking points

The pulsating contest was also overshadowed by controversy surrounding several refereeing decisions.

Egypt were left aggrieved over a number of calls, including appeals for penalties and other key decisions, while Argentina also questioned some officiating during the match.

The contentious calls sparked heated reactions from players, coaching staff and fans, making the referee's performance one of the major post-match talking points.

Quarter-final awaits

Messi finished with a goal and an assist, inspiring Lionel Scaloni's side to keep their title defence alive despite an inconsistent display for much of the match.

Argentina will now face Switzerland in the quarter-finals after the Europeans edged Colombia in a penalty shootout.