Algeria and Austria put in an incredible performance to secure the point they needed to qualify for the World Cup knockout stages and defeat Iran.
Austria, who had led twice, were already on their way out of the game when Riyad Mahrez scored his second goal of the game to give Algeria a 3-2 lead in the 93rd minute.
At this stage, Iran was among the top eight teams in third place.
But then Sasa Kalajdzic headed in a 96th-minute equalizer to secure a point in the Group J match, sparking dramatic scenes of celebration among the Austrian contingent in Kansas City.
By winning this late draw, Austria became the first team to avoid defeat in a World Cup match, falling behind in the 90th minute.
Iran, who saw a late winning goal disallowed for offside following an assistant referee’s video check in Saturday’s 1-1 draw with Egypt in Group G, are eliminated despite being unbeaten having drawn all three of their matches.
But even though Austria and Algeria went into this match knowing that a draw would lead them both to victory, there was no sense of a repeat of the “Shame of Gijon”.
In that infamous 1982 World Cup match in Spain, West Germany beat Austria 1-0 in a group match in which both teams compromised. They knew that such a score would allow them both to enter the game at the expense of Algeria.
But this match was played in the right spirit throughout, with the intensity only letting up in the final few minutes before the two goals in stoppage time.
Having finished second in Group J, Austria will now face Spain in the round of 16 in Los Angeles on Thursday (20:00 BST), while Algeria, who eliminated Iran to become the final third-place finishers, will take on Switzerland in Vancouver at 04:00 BST on Friday.
The game started with high intensity and shots from both sides in the first 10 minutes but fizzled out by the hydration break in the first half.
Moments after play restarted, however, Marko Arnautovic raced towards David Alaba’s ball to control the ball and fire a shot past a surprised Osama Benbot, who was slotted in front of Luca Zidane.
Facing the prospect of relegation, Algeria came up front and Fares Chaibi rattled the post with a superb shot from 20 yards before Rafik Belghali was quickest to react to the ball bouncing into play off the corner flag, cutting into the box and gaining some space before firing high at the near post with half-time looming.
Austria restored their lead 10 minutes after the break when Marcel Sabitzer’s first-time shot went wide following Konrad Laimer’s drive towards the edge of the area.
But five minutes later, Mahrez found himself at the far post after a precise shot and cross from Houssem Aouar.
Both teams were close to winning, but after the 85th minute the intensity of the match dropped.
After noise could be heard from the stands in the first four minutes of stoppage time, it intensified again as Mahrez ended a spell of uninterrupted possession with a corner kick from the right of the box in the 93rd minute to give Algeria a 3-2 lead and finish second.
However, just 61 seconds after coming off the bench, Kalajdzic headed home in the 96th minute – two more than allotted – to snatch a draw in the most dramatic of finishes.
