An Ireland side missing many of their first-choice players did enough to hold out against Japan and get revenge for their World Cup defeat.
Tries by both centres and a metronomic kicking display by flyhalf Joey Carbery was enough to clinch a 39-31 victory for the men in green.
Japan looked to pick up where they had left off against the British & Irish Lions after their defeat last week. The Brave Blossoms were fast out of the blocks in the first half, and a try by captain Michael Leitch gave them an early lead before Ireland struck back through Stuart McCloskey.
A second try to Japan by Timothy Lafaele looked to have secured them a half-time lead before Ireland snatched a try of their own after the hooter to go into the tunnel with a slender 19-17 lead after Finlay Bealham dotted down.
The second half started much as the first did with Japan striking early. Wing Siosaia Fifita crossed the whitewash to see the lead change hands for the sixth time in the match.
Ireland ultimately secured their hard-fought victory with two tries in quick succession through Josh van der Flier and mercurial wing Jacob Stockdale.
Japan fought back with a try of their own through replacement scrumhalf Naoto Saito to put them only two points adrift. For a time it looked as if Japan might pull off a last-minute heist.
Ultimately, though, Ireland maintained their composure and sealed victory as Carbery slotted two pressure penalties to give his side an eight-point buffer which would prove to be enough.
Ireland coach Andy Farrell will be pleased by the performance of his youthful side while Japan will feel that this was a game that could have been won.