Japan have produced a scintillating display of attacking rugby before holding back a spirited Scottish fightback to triumph 28-21 to reach the Rugby World Cup quarter-finals for the first time.
Wing Kenki Fukuoka led the way with two tries, while Kotaro Matsushima and Keita Inagaki also scored on Sunday night as the hosts held off a fierce second-half assault from a team they had never beaten.
"Tonight we went another level," Japan coach Jamie Joseph said.
"They wanted it as much as the Scots and gave as much as they could. This is what it takes to win big test matches.
"The Japanese haven't trusted themselves in big moments. Now they know what it takes to get across the line."
When Japan beat South Africa four years ago - having won only one of their previous 24 World Cup matches - it was considered the greatest shock in rugby history. This time, having already beaten Ireland three weeks ago, it did not even feel like a real surprise.
They were faster, sharper, more inventive and, roared on by the vast majority of the delirious red-clad 72,000 crowd, as they became the first tier-two team to reach the last eight since Fiji in 2007.
Having won all four of their matches to top Pool A, they will face the Springboks in the quarter-finals.
The result also meant that Ireland, through as runners-up, will play New Zealand.
The match was given the go-ahead only on Sunday morning after Typhoon Hagibis and proved an uplifting occasion after the death and destruction wrought by the storm.
"For those suffering from the typhoon this was for you guys," Japan captain Michael Leitch said.
"Our heart goes out to all the people suffering from the typhoon."
Scotland were first on the board with a Finn Russell try after seven minutes but Japan hit back after Fukuoka tore down the left and, as he was tackled, offloaded to Matsushima to go over.
Soon Fukuoka and Matsushima again put on the afterburners before a series of off-loads and side-steps ended with Shota Horie setting up prop Inagaki.
Japan then grabbed a third at the end of the half when Tim Lafaele's deft grubber bounced perfectly into the arms of Fukuoka.
Two minutes into the second half, Fukuoka stripped Chris Harris and galloped clear for a fourth and bonus-point clinching try.
But WP Nel and Zander Fagerson both scored to get Scotland back within seven points with 25 minutes to go.
It was relentless Scottish pressure till the buzzer, but the hosts held out for a famous victory.
It was only the second time Scotland have failed to reach the last eight - the other coming in 2011 - after bookending wins over Russia and Samoa with defeats by Ireland and the hosts.
"Japan deserved it today," Scotland coach Gregor Townsend said.
"They played really well in that first 50-60 and they are a very good team."