Belgium won their World Cup group by thrashing New Zealand 5-1 on Friday while Iran were made to wait to see if they reach the last 32 when they drew 1-1 with Egypt.
The Pharaohs had learned before the game in Seattle that they were qualified due to results elsewhere, but Iran had a goal ruled out in stoppage time for offside, leaving their hopes in the balance as a third-placed team.
Iran were deprived of a certain place in the World Cup knockout phase when a goal in stoppage time that would have given them a 2-1 win against Egypt was disallowed.
Shoja Khalilzadeh thought he had scored the crucial winning goal as he slammed into the net after Egyptian defenders failed to clear, but Iranian celebrations were cut short after VAR deemed there was offside.
The final whistle sounded soon afterwards, leaving white-shirted Iranian players sprawled on the turf in disbelief.
Iran keep hopes alive
With three points, Iran retain hope of qualifying as one of the eight best third-placed teams.
Mehdi Taremi had also hit the bar with a header for Iran in the closing minutes of normal time.
The Egyptians having learned before the game that they were qualified for the last 32 for the first time in their history due to results elsewhere but that took nothing away from a ferocious game in Seattle.

