Substitute Nacer Chadli scored in the fourth minute of stoppage time as Belgium came from two goals down to defeat Japan 3-2 and set up a quarter-final match against Brazil at the World Cup.
Chadli broke Japanese hearts when he completed a move on the break, with all five goals coming in the second half of an enthralling last-16 match in the Rostov Arena on Monday.
Two goals in four minutes shortly after the break by Genki Haraguchi and Takashi Inui put Japan ahead, before headers from Jan Vertonghen and substitute Marouane Fellaini levelled the score.
But Japan, who had been tactically brilliant throughout the game, paid for a moment of naivety at the end following a corner, when keeper Thibaut Courtois rolled the ball out quickly, Kevin De Bruyne broke through the middle and Thomas Meunier’s pass into the area was met by 65th-minute substitute Chadli.
Haraguchi opened the scoring in the 48th minute when played through by Inui on a counter-attack. Hanover’s new signing at first hesitated on the right of the area before his angled shot went past Thibaut Courtois in goal.
Almost immediately Eden Hazard struck the post for Belgium, but in their next attack Japan doubled their score, when Shinji Kagawa back-heeled to Inui on the edge of the area, and he had time to tee up a shot inside the keeper’s left post.
After the shock of the two goals, Lukaka had a glancing header wide before defender Jan Vertonghen popped up with a header in the 69th minute which looped over Eiji Kawashima in goal.
The Japanese defence had made a mess of clearing the ball after a punch out by the keeper, who was then off his line when Vertonghen headed back across the goal, the ball drifting in under the bar at the far post.
Five minutes later Hazard crossed from the left and substitute Fellaini, sent on in the 65th minute for Dries Mertens, rose to head in from close range.
Japan coach Akira Nishino returned to the starting line-up fielded against Colombia and Senegal, after changing six players in the last match against Poland.
He promised a more attacking approach and Japan lived up his word, with Kagawa shooting wide in the first minute in an enterprising opening spell.
Belgium gradually got the upper hand, and Romelu Lukaka had a couple of shots deflected wide, a Hazard effort was punched away by Kawashima and there was constant threat in and around the Japanese penalty area.
But when Japan did get forward there were moments of danger for Belgium. Inui headed at Courtois, who shortly after allowed a deflection by Yuya Osako through his legs before recovering, although replays showed the striker was probably offside.
The game ebbed and flowed in the second half, with Belgium looking the likelier to score a third. Kawashima saved headers in quick succession from Chadli and Lukaku, then blocked a Vertonghen effort.
Courtois had to look sharp to parry what would have been an own goal by Axel Witsel and then save a Keisuke Honda free-kick. It was from the corner that Japan were punished and Belgium’s golden generation lived to fight another day.