Hosts Japan displayed nerves of steel as they edged out New Zealand 4-2 in a penalty shootout to reach the men's Olympic football semifinals on Saturday.
After a goalless 120 minutes at the Ibaraki Kashima Stadium, New Zealand full back Liberato Cacace's penalty was saved by Kosei Tani and midfielder Clayton Lewis blasted his spot-kick over the bar.
Captain Maya Yoshida made it four out of four from the spot as Japan booked a place in the Olympic semifinals for the first time since the London 2012 Games.
Japan are the only team to maintain a perfect record in the group stage and are now just one win away from securing a first medal in men's football since claiming bronze at the 1968 Games.
They will next face Spain, who ended their 21-year wait to reach the final four with a 5-2 win over Ivory Coast.
"We would've liked to have scored in the 90 minutes but New Zealand are a good team and really gave us a tough game," Japan coach Hajime Moriyasu told reporters.
"It's going to be a tough game in the semifinals, but we will stick together as a unit and battle it out to the death and try and reach the final."