Belgium completed a stunning second-half comeback to rescue its World Cup hopes and crush those of Japan in Rostov-on-Don.
With the "Samurai Blue" leading 2-0 after 52 minutes, it looked as though the Red Devils' star-studded squad would be the latest to bite the dust after a long line of upsets in Russia.
However, headers from Jan Vertonghen and Marouane Fellaini hauled Belgium level, before a stunning counterattack saw Nacer Chadli snatch a dramatic last gasp winner with the last kick of the game.
Belgium will now play Brazil on Friday in a much-anticipated quarterfinal clash.
Defeat was a cruel outcome for a Japan side that was smooth in possession, incisive in attack and brave in defense all evening.
With the game scoreless at halftime, Akira Nishino's team began to take control at the beginning of the second period -- scoring two quickfire goals to leave the Belgians staring down the barrel.
Striker, Genki Haraguchi, opened the scoring with an accurate strike into the bottom corner after being played through by Gaku Shibasaki.
And before Belgium had chance to process going behind, Japan had doubled its lead.
Kagawa showed some neat footwork on the edge of the area before popping a pass off to Inui. Taking one touch to move the ball out of his feet, the play-maker struck sweetly to find the far corner past the flailing arm of Thibault Courtois in goal.
Belgium looked shell-shocked, as did manager Roberto Martinez who was stood passively in the technical area locked in confused conversation with assistant Graeme Jones.
But it was a moment of inspiration, or perhaps just sheer good fortune, that got Belgium back into the game.
Inui's wild clearance in the box following a Belgium corner launched the ball 20 feet into the air. Vertonghen watched it come down onto his head and looped the ball over keeper Eiji Kawashima and into the top corner.
Incredibly, the Belgians were level within minutes.
Captain Eden Hazard put an inviting cross into the box and Marouane Fellaini outmuscled Gen Shoji to head past Kawashima.
Belgium had never won a last 16 World Cup match inside 90 minutes and as the clock ticked down it looked increasingly likely that this game was to be decided by extra time or penalties.
But with just seconds remaining, a rapid counter-attack saw Belgium complete its remarkable comeback.
Nacer Chadli was in the right place as Thomas Meunier's low cross arrived at his feet to calmly slot home.
Celebrations and commiserations
Belgium's players and bench celebrated wildly. And there was more than a hint of relief that this "golden generation" of players hadn't thrown away another shot at tournament glory.
Japan barely had time to restart the game as referee Malang Diedhiou blew his whistle for full time.
There was a mixture of shock and despair on the Japanese players' faces. Some beat the ground, while others sat in stunned silence. In the crowd, fans bedecked in Japanese blue could not hold back their tears.
Fans watching the match from Japan in the early hours of Tuesday morning clutched their heads or covered their faces as their team lurched to a loss.
However, as they emerged from viewing parties at around 5 a.m., some Japanese fans still applauded their team's efforts in advancing so far in the Cup.
"I have nothing but to thank the players who gave us a moment to dream the victory," said Wataru Egawa, a 26-year-old IT engineer.
Another fan, 40-year-old Tomoaki Shoji, left a local sports bar wearing an old national team uniform from back when Japan narrowly missed the cut to join the World Cup in 1994.
"We scored two goals first, that's why it's a pity. It was not a disastrous loss. It was close. Japan grew stronger," he said.
Japan's Prime Minister Shinzo Abe echoed the same sentiment on Tuesday. "Ah, it was really close. I would like to thank all of Japan national team players," he said.
Back in the stadium, Japanese fans draped in flags regained their composure after the match and collected garbage from the stadium for one last time.
Belgium boss Martinez later acknowledged his side had been fortunate but told reporters that in the World Cup "it's about getting through, it's about winning."
That point of view seemed to be appreciated in the Belgian capital of Brussels where thousands of supporters at a public screening of the match greeted the victory with joyous celebrations.
Those fans, and their heroes in Russia, now have a quarterfinal against tournament favorites Brazil to look forward to.