The 2007 champions Iraq, who had already topped the group, scored in the 12th minute of injury time against 10-man Vietnam for a thrilling 3-2 win.
Aymen Hussein scored twice, including the decider at the death from the penalty spot, to take his tally to a tournament-leading five goals. Vietnam led three minutes before the break when Bui Hoang Viet Anh poked home off a Khuat Van Khang free-kick.
That would be Khuat's last major attacking involvement - he was sent off in first-half stoppage time for a second yellow card. Rebin Sulaka equalised immediately after the restart and then Hussein, on as a substitute, made it 2-1.
Hussein missed a penalty and it looked like he would be made to regret it when Nguyen Quang Hai got behind the Iraqi back line to score on the stroke of the 90th minute to make it 2-2. But Vietnam gave away another penalty deep in added time and on this occasion Hussein did not miss.