Asian Footballer of the Year Ali Daei scored a second-half goal to send Iran into the Asian Cup quarter-finals with a 1-0 win over Iraq in Sidon on Wednesday.
Despite the defeat, Iraq also made it to the quarter-finals, coming second behind Iran in Group A after hosts Lebanon and Thailand battled to a 1-1 draw in the group's final matches.
The results left Iran top on seven points, followed by Iraq on four and Thailand and Lebanon on two points each.
The Thais, who have a better goal difference, retain a slim chance of reaching the last eight as one of the best two third-placed teams among the competition's three groups.
Man-of-the-match Daei pounced on a loose ball spilled by Iraqi keeper Amer Abdulwahab, and, after a lucky ricochet, rolled it into an empty net from two yards out in the 77th minute.
The Hertha Berlin striker took his goal tally in the competition to three in three matches.