Japan, three-time Asian Cup champions, made sure of top spot in Group B with a convincing 4-1 victory over joint-hosts Vietnam in their final group match at the My Dinh National Stadium in Hanoi.
Japan's Shunsuke Nakamura, left, and Vietnam's
Nguyen Minh Phuong do battle in Hanoi [EPA]
The result meant that Japan remain in Hanoi for their quarter-final match with surprise packets Vietnam, ranked 142 in the world when the tournament started on July 7, also qualifying for the second round due to the UAE's 2-1 victory over Qatar's at the Army Stadium in Ho Chi Minh City.
Japan top their group on seven points while Vietnam continue to live the dream, advancing in second place on four points, with UAE third on three points and Qatar finishing last on two points.
The final group matches were played simultaneously, and things looked good early for Vietnam as they went ahead through a Keita Suzuki own goal in the eighth minute, but Japan then clicked into gear with four unanswered strikes, two from forward Seiichiro Maki and one each to Yasuhito Endo and Shunsuke Nakamura.
Meanwhile down south in Ho Chi Minh City, Qatar took a first half lead when Uruguayan-born striker Sebastian Quintana scored his and his side's third goal of the tournament with a penalty, after he himself had been fouled in the box.
However just when Vietnam were looking down and out, needing a UAE victory or a draw in the other match, the Gulf Cup champions staged a stunning comeback with second half goals to Saeed Alkas in the 59th minute and Faisal Khalil with the winner in added time.
Early at the My Dinh National Stadium, Japan defender Akira Kaji needed to head the ball out the back to safety, and from the ensuing corner the ball ricocheted into the net to give the home side a surprise lead.
Le Cong Vinh claimed the goal, but replays showed the ball deflecting off an unknowing Keita Suzuki to stun Japan with Yuki Abe and Kengo Nakamura standing with their hands on their hips in disbelief.
However just five minutes later Japan's Celtic star Shunsuke Nakamura bamboozled defender Nguyen Huy Hoang on the left, and whipped in a perfect cross with Phung Van Nhien caught ball watching and JEF United's Maki bundling the ball in off his chest at the far post.
Japan run riot
Then in the 31st minute Japan forward NoahiroTakahara was chopped down by Huy Hoang right on the edge of the area and in perfect free-kick range.
Dead-ball specialist Shunsuke Nakamura stood over the ball but it was Endo who struck a fearsome right-foot bullet past the Vietnam wall that gave keeper Duong Hong Son no chance.
Even with the one-goal deficit Alfred Riedl's side, who had a defensive feel about them, to sit back early in the second half as Japan patiently strung multiple passes together.
After a build up of several passes, an excellent interchange between Yuichi Komano and Endo set up Nakamura on his less-favoured right foot from the top of the box, with his side-footed shot evading a diving Hong Son in the 53rd minute.
Qatar choke after leading
Finally, Le Tan Tai brought down Komano on the left, and from the free-kick the ball was whipped in by Endo with Maki converting his second when beating two defenders to the ball at the far post after Hong Son had come out flapping at thin air.
Uruguay-born Quintana scored his third goal
for the tournament, but it wasn't enough [EPA]
Vietnam showed some glimpses of brilliance and skill on the ball in the latter stages, but they were clearly outclassed and must now travel to Bangkok for their quarter-final match.
Meanwhile at the Army Stadium Qatar were looking good to go through in second spot, but couldn't hold their nerve as Alkas equalized just before the hour mark when he connected with a cross from the right with towering header.
Qatar, knowing they were out of a qualification spot, then went searching for another goal but it was Khalil who stole the win in stoppage time when following in a scorching free-kick that Qatar keeper Mohamed Saqr could only parry into the path of the Al Ahli striker for the winner.