Iran face a tense wait over whether they can advance to the World Cup knockout stage after being held to a 1-1 draw against Egypt in a match that ended dramatically when a last-minute goal was disallowed for offside.
Egypt, already assured of a place in the 32-team round, went ahead in the 5th minute through Mahmoud Saber, before Ramin Rezaeian equalised from a tight angle in the 14th minute during a frantic opening.
The early flurry quickly subsided as the game became disjointed, until a remarkable finish when Iran hit the woodwork before securing what seemed like a famous victory, only for VAR to intervene.
Iran's Mehdi Taremi, who had missed a first-half penalty, headed against the bar in the final minute before Shoja Khalilzadeh slotted home in the 93rd minute, sparking wild celebrations as Iran's substitutes flooded the pitch.
However, Khalilzadeh was adjudged offside and Egypt held on for the draw, meaning they finished the group stage with five points, second behind Belgium on goal difference, and will face Australia in Dallas on July 3 in the knockout phase.
Iran finished third with three points and must wait for confirmation whether they can progress as one of the eight best third-placed teams.
The match played out with loud support from Egyptian fans, though a significant number of Iranians were also present, some waving pre-revolution flags and booing the Iranian national anthem. Friday's match was also designated a 'Pride Match' by local organisers and a number of rainbow flags could be seen inside the stadium, but the game passed without incident off the pitch.