Iran opened the scoring in the third minute with Sardar Azmoun producing a brilliant overhead kick, leaving the Qatari goalkeeper and the defence as spectators.
Jassam Gaber got the equaliser on 17 minutes and Akram Afif gave Qatar a 2-1 lead minutes before half time, sending the home crowd into a frenzy.
Iran’s Alireza Jahanbakhsh drew Iran level with a penalty after Qatar’s Ahmed Fathy was penalised for a handball.
Local hero Almoez Ali restored Qatar’s lead on 82 minutes, setting up a breathless finale as Iran threw everything they had at Qatar.
Iran struck the post and won a multitude of corners – with the goalkeeper sent forward in a desperate search for an equaliser – but Qatar held on to secure their passage to the final where they will meet Jordan.