Iran and Kuwait had already secured progression to the 2015 Asian Cup finals but played out a five-goal thriller in their final qualifier.
Kuwait coach Jorvan Vieira had promised his side would go all out for victory at the Enghelab Stadium on Monday despite being assured of qualification from Group B, but it was unbeaten pool leaders Iran who claimed a 3-2 triumph.
Karim Ansarifard notched an injury-time winner for Iran just two minutes after Fahad Al Rashidi had seemingly rescued a point for Kuwait.
Despite the match being a dead rubber, there was plenty of excitement for those in attendance.
Yaghoub Karimi got the ball rolling for Iran after just two minutes, yet the sides were level at half-time thanks to Waleed Ali Jumah's equaliser.
Payam Sadeghian Sharafabad restored Iran's lead shortly after the hour mark, but Kuwait equalised in the 89th minute through Al Rashidi.
There was still time for one last twist, however, as Ansarifard grabbed a winning goal for Iran in the first minute of injury-time.
Thailand - who have yet to gain a single point in qualification - host Lebanon in Group B's final match on Wednesday.