Greig Laidlaw came off the bench to kick four late penalties as Scotland secured an undeserved 21-16 win over a gutsy Japan side in the second Test in Tokyo.
Japan showed they have something to offer at this level, scoring the only try of the game -- a glorious 90-metre move finished off by Keito Shigeno -- in front of a record crowd of 33,073.
But Laidlaw, a second-half replacement for Henry Pyrgos, kept his cool to slot four late penalties to help the tourists round off a long season with a narrow victory and a 2-0 series triumph.
Scotland captain Pyrgos got the first points on the board after three minutes when he kicked a penalty earned for offside after wing Tommy Seymour had brilliantly controlled an attempted grubber kick which bounced back.
Japan responded well, their speed and exuberance catching the tourists offside, allowing Yu Tamura to level the scores moments later.
There was a scare for Scotland's fans when wing Yasutaka Sasakura intercepted Ruaridh Jackson and raced under the posts, but the players knew they had already been given a penalty for a high tackle on Josh Strauss.
Pyrgos edged his side in front with his second penalty on 16 minutes, but the Japanese then produced the moment of the match as they exploded from their own 22 for a truly memorable try.
Sasakura was put clear on the left and, although he was caught on the halfway line, the hosts got numbers to the ball quickly and a wide pass from Tamura caught the Scotland defence cold. Centre Harumichi Tatekawa made ground before finding the half-backs in support, with Tamura sending scrum-half Shigeno over for a fine score which Tamura converted.
The Japanese discipline was still a problem and Pyrgos sent over a third penalty before the Scots were spotted with a hand in a ruck and Tamura restored his side's four-point advantage.
The second-string Scotland front row was having problems in the scrum, and they were not doing enough damage at the line-out to dominate possession, leaving the hosts to play the more fluent rugby.
They fully deserved their 13-9 half-time lead, but Scotland rectified their scrum problems by changing the entire front row at the interval.
Their mission to rescue the match soon got harder when they were penalised for failing to retreat at a ruck, and Tamura put over his third penalty, though the seven-point cushion was short-lived with Laidlaw coming off the bench to slot two quickfire kicks to get the Scots back within one point.
Scotland had a real scare when a long, patient attack from Japan created the tiniest of openings for replacement scrum-half Keisuke Uchita, but he knocked on going for the line.
Japan were dominating, with Scotland unable to get the ball for long enough to mount any kind of serious challenge in the hot, humid conditions.
There was time for the scrum to do its job, though, and, after a rare breakout from defending their own line, the tourists won a penalty.
Laidlaw sent his kick straight between the posts to hand Scotland the lead and, after a huge kick from Stuart Hogg then gave them a second attacking platform, Laidlaw did the business again with another penalty to seal victory.