Holders Japan stormed into the Asian Cup quarterfinals with a ruthless 4-1 victory over co-hosts Vietnam on Monday.
But Vietnam, appearing in the tournament for the first time in 47 years, joined Japan in the last eight after Qatar lost 2-1 to United Arab Emirates in the other Group B game.
A Keita Suzuki own goal after just seven minutes triggered riotous celebration among a crowd of 40,000 in Hanoi, but it took Japan just five minutes to restore normal service.
Celtic midfielder Shunsuke Nakamura found space on the left to float over a perfect cross for Seiichiro Maki, who had the simple task of chesting the ball into an open goal. Yasuhito Endo put Japan ahead just after the half hour.
Nakamura added a third seven minutes into the second half with a superb right-foot strike before Maki headed in his second from close range in the 59th minute.
The United Arab Emirates struck in stoppage time through Faisal Khalil to knock out Qatar 2-1 in Ho Chi Minh City.
Qatar had looked to be on their way into the last eight when Uruguay-born striker Sebastian Quintana converted a penalty three minutes before halftime.
UAE levelled through Saeed Alkas before Khalil scored the winning goal.
Meanwhile Australia and Iraq entered the quarters from Group A. Mark Viduka scored twice as Australia beat Thailand 4-0 in Hanoi. Michael Beauchamp and Harry Kewell scored the other goals.
Australia and Thailand finished Group A level on four points in second place but Australia went through based on their head to head result and will play Japan in the last eight in Hanoi.
Iraq moved up after holding a spirited Oman to a goalless draw in Bangkok. Iraq will play Vietnam in Bangkok on Saturday.