Hosts and defending champions Qatar edged Iran 3-2 in a thrilling Asian Cup semi-final on Wednesday with striker Almoez Ali scoring the winner to set up a title clash with Jordan.
In an end-to-end game at Al Thumama Stadium, Ali netted in the 82nd minute while Iran lost Shojae Khalilzadeh to a late red card in stoppage time as Iran coach Amir Ghalenoei lost for the first time since he took charge last year.
Qatar will take on Jordan in the final on Saturday at Lusail Stadium.
"I'm very happy for everybody, the people of Qatar, the fans and the players. It was a complicated match but I think we played well. The players did not spare any effort," Qatar coach Marquez Lopez told reporters.
"The players implemented my philosophy and ideas on the pitch so they deserve my thanks. Now we have one final step left to defend our title."
Iran wasted no time in getting on the board when Qatar failed to deal with a long throw-in and Sardar Azmoun scored with an overhead kick to give Ghalenoei's side a third-minute lead.
Iran constantly got in behind Qatar's defence but it was the hosts who equalised against the run of play when Jassem Gaber's shot from range took a deflection and looped over goalkeeper Alireza Beiranvand into the net.
Qatar's Akram Afif nearly made it 2-1 when the ball fell to him and he raced away with Iran's defenders giving chase but his shot was well saved while his effort from the rebound went over the bar.
But Afif got his fifth goal of the tournament on the stroke of halftime when he waltzed into the box from the left channel and pulled the trigger to beat Beiranvand with a shot that arrowed past his outstretched hand into the top corner.
However, Iran came out with renewed vigour for the second half and won a penalty for a handball after a VAR check when Saeid Ezatolahi shot straight at Ahmed Fathy, who was trying to protect his face and turn away.
Having scored a late winner from the spot against Japan in the quarter-final, Alireza Jahanbakhsh stepped up once again and fired his spot kick straight down the middle to make it 2-2.
Iran had their chances to score a third through some chaotic moments in the box but it was Qatar who took the lead again when Ali controlled a pass, turned and fired into the bottom corner.
Ali, the top scorer in the 2019 edition, had been under pressure to score having netted only once in the tournament and the goal seemed to lift a burden off the 27-year-old.
With 13 minutes added on for stoppages, Iran was then reduced to 10 men when Khalilzadeh barged into Afif during a counter-attack, with the referee upgrading his yellow card after a VAR check.
Jahanbakhsh nearly equalised right at the death but saw his shot come off the post as Qatar managed to hold on and advance to the final.
"I apologise to the Iranian people, we had a responsibility to make them happy today. I want to thank all my players, they gave everything," Ghalenoei said.
"If you're looking for someone responsible for this defeat, it is me - not the federation or players. I think today was one of the worst days I've had in my life."