A brace from Megan Gaffney was not enough to prevent Scotland from losing their first-ever meeting with Japan as the visitors ran out 24-20 winners at Scotstoun.
Gaffney’s double plus further tries from Lisa Cockburn and Rachel Malcom had helped Philip Doyle’s side come from behind to lead 20-10 in the enthralling topsy-turvy encounter.
Japan had responded to Gaffney’s early try with two efforts of their own to go in front, only for Scotland to hit back to go into the break level before taking the lead after the restart.
But despite having a ten-point advantage with ten minutes to go, two late converted tries from Mako Ebuchi and Ayasa Otsuka saw the visitors take the spoils at the death.
The hosts had enjoyed a dream start when Hannah Smith broke down the right wing before the ball was recycled and switched to the other wing where Gaffney raced over.
Helen Nelson was unable to kick the tricky touchline conversion and it was not long before Japan hit back, with Noriko Taniguchi responding by going over in the corner.
The conversion again fell short but Japan took the lead for the first time on eight minutes with their second try as the full-throttle opening at Scotstoun continued at pace.
Once again it was Taniguchi who found a gap in the Scottish defence and following a couple more phases, the visitors were able to double their tally in the corner.
Another missed kick at goal gave Scotland a slight reprieve, although Japan were soon back on the attack after finding more joy through the middle of the park.
But with the visitors piling the pressure on, Scotland showed their resilience to defend their line from 5m out and clear their lines after securing a crucial turnover.
Ai Hirayama had an opportunity to extend the visitors lead after Scotland were penalised for side entry at the breakdown but the hosts were let off again as her effort fell short.
And Scotland took advantage of their fortune to equalise just before the break after Smith secured valuable territory before Nelson found touch with a kick after Japan gave away a penalty.
More Japan indiscipline provided Scotland with another kick to the corner and from the resulting lineout drive, Cockburn drove over the whitewash for her first try for her country.
The post denied Scotland the extras and left the scores all-square at the interval before the hosts came out firing after the restart and grabbed the game by the scruff of the neck.
Nelson and Chloe Rollie combined expertly before setting up Jade Konkel to score and while she came up short, the ball was recycled for Gaffney to score her second of the afternoon.
The conversion narrowly dropped short but it was soon forgotten as Scotland’s fourth try arrived on the hour, with Rachel Malcom crashing over the line after another powerful drive.
Scotland appeared to be cruising to victory going into the final ten minutes, only for Ebuchi to crash over for a converted try to cut the gap to just three points.
Then, with only two minutes remaining, Otsuka glided over the line to seal a remarkable fightback and break Scottish hearts, with the conversion completing a 24-20 triumph.