Almoez Ali's late strike helped Qatar reach the final of the Asian Cup and continue their title defence with victory over Iran.
Hosts Qatar led after goals from Jassem Gaber and Akram Afif cancelled out Sardar Azmoun's superb overhead opener.
A controversial penalty decision helped level the scores, but Ali's 82nd-minute strike and Shoja Khalilzadeh's late red card were fatal to Iran's final hopes.
Qatar will play underdogs Jordan in Saturday's final at Lusail Stadium.
Jordan stunned two-time winners South Korea on Tuesday to reach their first Asian Cup final.
Qatar are bidding to become the first team since Japan in 2000 and 2004 to win back-to-back Asian Cup titles.
Iran's semi-final got off to the perfect start when Azmoun leapt acrobatically to fire home a sensational overhead kick after Qatar failed to clear a long throw into their box.
Al Thumama Stadium erupted 13 minutes later, however, as Jassem's Gaber's strike took a huge deflection off Saeid Ezatolahi and looped over goalkeeper Alireza Beiranvand.
The equaliser caused outcry from the Iranian bench, who thought Mehdi Taremi had been fouled in the opposite box seconds earlier, and Mehdi Torabi was booked for demanding a penalty from the touchline.
Having wasted a simple opportunity earlier in the opening half, Afif redeemed himself when he cut through Iran's defence before netting his fifth goal of the tournament to take him within one of Iraq's Aymen Hussein - the Golden Boot leader.
Iran were handed a lifeline early in the second half when the video assistant referee intervened to recommend a review of a penalty decision.
Despite initially waving away appeals of a handball and Ahmed Fathy keeping his arms close to his chest, the referee changed his decision and Alireza Jahanbakhsh calmly slotted the spot-kick straight down the middle.
Goalline clearances at both ends of the pitch kept the tense encounter level until Ali picked out the bottom corner with less than 10 minutes of normal time remaining.
Iran's hopes of reaching their first final since 1976 went from bad to worse when Shoja Khalilzadeh's yellow card for wiping out Afif was upgraded to a red after a VAR intervention.
Qatar are the AFC Asian Cup 2023 champions after beating Jordan 3-1 in the FINAL.
Lusail: Akram Afif scored a hat-trick of penalties as Qatar won their second consecutive AFC Asian Cup™ title after defeating Jordan 3-1 in the Qatar 2023™ final at a packed Lusail Stadium on Saturday.
Though Yazan Al Naimat’s equaliser gave first time finalists Jordan a flicker of hope, Afif’s coolness and Qatar’s overall superiority saw them defending the title they won in emphatic fashion in 2019 comfortably.
Afif’s hat-trick, the first of the tournament, took his tally to eight as he won the AFC Asian Cup Qatar 2023 Yili Top Scorer Award.
Ahead of the kick-off, Iraq legend and former captain Younis Mahmoud unveiled the AFC Asian Cup trophy in front of a capacity crowd at the Lusail Stadium, warming the fans up nicely for the final.
Qatar settled the faster with Afif almost catching Jordan napping in the fifth minute when he waltzed through the defence but goalkeeper Yazeed Abulaila was quick off his line to thwart the danger.
Afif had another crack at goal two minutes later when Lucas Mendes did well on the right flank before sending his cross into the six-yard-box but the Al Sadd forward fired a low drive straight into the arms of Abulaila.
Qatar continued to pressure the Jordanian defence with Hasan Al Hydos threading a delightful through ball to Almoez Ali, who was stopped in his tracks by an alert Mahmoud Al Mardi.
Limited to just counter-attacks, Jordan’s Nizar Al Rashdan whipped a long ball for Ali Olwan, with the forward setting up Yazan Al Naimat, who forced goalkeeper Meshaal Barsham to parry his powerful drive from above the box.
Jordan struggled to match Qatar’s intensity and paid the price in the 22nd minute following Abdallah Nasib’s clumsy challenge on Afif, who coolly slotted home the ensuing penalty to take his tournament tally to six which also confirmed him as the AFC Asian Cup Qatar 2023 Yili Top Scorer.
Jordan, having had to play second fiddle for the majority of the half, could have equalised just before the break but Mousa Tamari saw his effort from inside the box blocked by Mohammed Waad, with the Montpellier forward then failing to find the target from close range, sending Olwan’s cross over the bar.
That, however, was a prelude to what was to come from Jordan in the second half as they took the game to Qatar.
Barsham, who had a quiet game in the opening period, had to be on his toes with Olwan threatening in the 56th minute with an acrobatic effort before the shot stopper denied Ehsan Haddad three minutes later from close range.
Jordan poured bodies forward and came close again in the 61st minute when Al Tamari was denied by the post with Al Rawabdeh hitting the side netting on the rebound, but their persistence was finally rewarded in the 67th minute.
An unmarked Al Naimat showed excellent ball control inside the six-yard-box when he collected Haddad’s cross from the right flank before riffling his effort into the bottom corner.
The increased tempo paid dividends in the 73rd minute when Qatar were awarded a second penalty following Mahmoud Al Mardi’s foul on Ismaeel Mohammad, with Afif again making no mistake from the spot to restore Qatar’s lead.
There was no respite for Jordan as they conceded their third penalty after goalkeeper Abulaila was judged to brought down Boualem Khoukhi after a VAR review, with Afif stepping up once more to convert from the spot to complete his hat-trick in the fifth minute of added time and hand Qatar their second AFC Asian Cup title.