Belgium dramatically recovered from going two goals to Japan to secure a last-gasp 3-2 victory and set up a World Cup quarter-final against Brazil.
Roberto Martinez's side came so close to crashing out of the tournament in Rostov as they found themselves behind to second-half goals from Genki Haraguchi and Takashi Inui.
The so-called Belgian 'Golden Generation' then staged a remarkable comeback, responding with goals from Jan Vertonghen, Marouane Fellaini and, in added time, Nacer Chadli to demonstrate the extent of their significant attacking threat.
Martinez's team had made the promising start expected of them, but consistently lacked the final touch they needed to convert their dominance of possession into goals.
Romelu Lukaku twice saw shots deflected wide for corners that came to little, and then with only a simple finish required from in front of goal, he struggled to connect with the ball.
Japan were stretched throughout a first half in which they were often defending, which did little to build confidence in their chances of resisting throughout the second, even if they almost took an undeserved lead on the stroke of half-time.
When Thibaut Courtois casually spilt a routine ball between his legs it was heading for the back of the net until he reacted and dived to recover, but even then Japan would have been happy it remained goalless when the whistle blew to conclude the opening 45 minutes.
If concerns had persisted that Belgium's wastefulness would cost them they proved correct only three minutes into the second half when they fell a goal down.
A swift counter-attack led to Haraguchi being sent through one-on-one with Courtois, after Vertonghen failed to cut out Gaku Shibasaki's through-ball, and he calmly finished first time into the far left corner.
Eden Hazard almost instantly equalised when curling against a post, but Japan instead doubled their lead in the 52nd minute when, from the edge of the area, Inui struck a fine effort into the bottom right corner out of Courtois' reach.
Martinez then brought on Chadli and Fellaini for Dries Mertens and Yannick Carrasco and their comeback began.
First Vertonghen - surely unintentionally from way out on the left - sent a looping header over goalkeeper Eiji Kawashima and inside the far post in the 69th minute.
Within a further five minutes Fellaini had then brought them level.
In a period of pressure Hazard created space to cross from the left wing and then watched as the midfielder nodded past Kawashima from in front of goal.
Belgium 2-2 Japan - Substitute Marouane Fellaini draws Belgium level with another header as Belgium finally start playing like they're in a World Cup game. #rtesoccer #worldcup #BEL #JPN pic.twitter.com/vfCoNnw8yx— RTÉ Soccer (@RTEsoccer) July 2, 2018
Both teams then came close to scoring a third, first when Kawashima produced a fine double save from Chadli's and Lukaku's close-range headers and then when Courtois saved a deflection from Axel Witsel and then Keisuke Honda's free-kick.
But in the fourth minute of stoppage time, the goalkeeper claimed a corner and rolled the ball out.
Kevin De Bruyne led a counter-attack and fed Thomas Meunier on the right and the full-back's cross was brilliantly dummied by Lukaku to leave Chadli with a simple finish at the back post to seal an unlikely victory.
Belgium 3-2 Japan. What a goal! What a horrible way to go out of the World Cup! Nacer Chadli sends Belgium through to the quarter-finals with a last-gasp goal #rtesoccer #worldcup #BEL #JPN pic.twitter.com/ggWONgcic5— RTÉ Soccer (@RTEsoccer) July 2, 2018