Nacer Chadli's 94th-minute winner completed a sensational comeback as Belgium beat Japan 3-2 to book a World Cup quarterfinal against Brazil.
After a goalless first half, Japan struck twice in seven minutes following the interval to take full control of a gripping last-16 tie in Rostov-on-Don on Monday.
Genki Haraguchi and Takashi Inui scored stunners as Japan looked set to reach the first World Cup quarterfinal in its history. But, instead, Belgium became the first team to come from two goals down to win in a World Cup knockout game since 1970 and will now face five-time winner Brazil on Friday.
Jan Vertonghen's looping header somehow beat goalkeeper Eiji Kawashima and Belgium's aerial power started to tell when Marouane Fellaini thumped home Eden Hazard's brilliant left-wing cross.
Keisuke Honda almost beat Thibaut Courtois with a free-kick in injury time but a clinical Belgium counter-attack, which ended in Thomas Meunier setting up Chadli for a simple finish, broke the Japanese hearts.
Belgium did not record a shot until the 17th minute as Axel Witsel and Vincent Kompany had shots blocked while Inui headed at Courtois at the other end as Japan - which reverted to its XI from the first two group games - sent a warning about its counter-attacking threat.
And a moment of madness from Courtois almost handed Japan the lead just before half-time, the goalkeeper spilling a tame shot from Yuya Osako but recovering to claw the ball back.
Japan had never scored a goal in the World Cup's knockout rounds but it ended its wait in the 48th minute through Haraguchi.
Another Belgium move broke down on the edge of the Japan box and Roberto Martinez's men fell victim to a rapid break, Gaku Shibasaki slipping a pass through to Haraguchi, who rifled a stunning shot across Courtois.
Eden Hazard struck the post from Dries Mertens' pass as Belgium almost levelled immediately. But within four minutes of taking the lead Japan was 2-0 up, Inui's strike perhaps even eclipsing Haraguchi's outstanding opener.
Shinji Kagawa was the creator, collecting a loose ball after a poor clearance and feeding Inui, the midfielder working himself a yard of space before arrowing home a 25-yard rocket.
When Romelu Lukaku somehow headed a perfect Meunier cross wide Belgium seemed to be heading out. But the side was given a lifeline when Vertonghen's looping header eluded goalkeeper Kawashima after a corner caused chaos in the Japan penalty area - and five minutes later the side was back on level terms.
Hazard twisted and turned to create space on the left wing, his cross perfectly delivered for substitute Fellaini to climb above his marker and crash in a downward header that gave Kawashima no chance.
Both sides had chances to win it, Kawashima making a magnificent save to tip over Lukaku's header before Courtois turned a speculative Keisuke Honda free-kick wide in added time.
Japan sensed its chance to snatch a late winner but Courtois claimed the resulting corner and within seconds the ball was in the net at the other end.
Courtois found Kevin De Bruyne with a long throw and the Manchester City playmaker freed Meunier with a terrific pass that left Japan struggling to cover the break.
Meunier kept his cool to square a low cross and, when Lukaku dummied the ball, substitute Chadli was on hand to sweep Belgium into an unlikely quarterfinal meeting with Brazil.
- Asian Games 2023: India wins archery mixed team compound gold
- Asian Games 2023: Overall medals tally October 4 - LIVE - India 4th with 71 medals, 16 gold; Ojas-Jyothi win archery gold; Eye on Neeraj, 4x400m men’s relay team for gold
- Asian Games 2023: India’s medal tally reaches 71, highest-ever at a single edition
- Manchester United risks early Champions League exit after Galatasaray defeat
- Van Gaal returns to struggling Ajax as adviser