Omar Al Soma's stoppage-time equaliser extended war-torn Syria's World Cup fairytale on Tuesday, as South Korea booked their spot to reach the tournament for the ninth straight time.
Syria were 2-1 down against Iran and heading out, but in the third added minute Mardek Mardkian slid a pass to Al Soma, who finished through goalkeeper Alireza Salimi's legs.
The 2-2 draw was enough to give Syria third place in Group A and a spot in the Asian play-offs against Australia.
South Korea spurned several late chances before settling for a 0-0 draw in Uzbekistan, grabbing the second automatic qualifying spot in Group A as their heartbroken hosts missed out.
Syria's heroics also extinguished China's faint hopes of reaching only their second World Cup, despite snatching a 2-1 win over 2022 hosts Qatar thanks to Wu Lei's late winner.
Earlier in Group B, Australia won 2-1 against Thailand but they will be knocked out of the second automatic qualifying spot if Saudi Arabia beat Japan in the evening's late kick-off in Jeddah.
The United Arab Emirates also saw their dream die when they lost 1-0 to Iraq to finish fourth in Group B.
But there was jubilation in Tehran as Syria, who have been playing home games in Malaysia to avoid the civil war raging in their country, continued to defy the odds.
Syria's goals from Tamer Mohamad and Al Soma were the first conceded in the final round by already qualified Iran, who were playing in their fortress Azadi Stadium.
Mohamad scored in the 13th minute before Iran equalised through Sardar Azmoun, who chested in a rebound on the stroke of half-time and then put the hosts ahead in the 64th minute.
Al Soma's heart-stopping goal had one Syrian team official in tears before the players hugged and celebrated at the final whistle.
"God willing we will continue the journey... the qualifications have started again," said Al Soma. "The players were heroes on the pitch from the first minute until the last minute."
Mardkian said: "We played with a united spirit, for Syria, for the Syrian people, for the kids, for all the people."
He added: "We're thinking about the play-off and there's more work to do... We hope to achieve what is worthy of Syria's name."
In Tashkent, South Korea's Hwang Hee-Chan hit the post early on before Azizbek Khaydarov also rattled the woodwork in the 21st minute in what was otherwise a tepid first half.
After the break, Kim Min-Woo's curling shot nearly opened the scoring following an intricate move around the box, as South Korea repeatedly pierced the Uzbek defence.
Veteran striker Lee Dong-Gook spurned a golden opportunity in the 86th minute when his free header came off the bar. Although the draw was enough for the Koreans, they will want improvements before the World Cup next June and July.
The top two in Group A and B gain automatic entry to the World Cup, while the two third-placed teams face each other -- with the winner going into an intercontinental clash against the fourth-placed side from the CONCACAF federation.