Ireland shrugged off the absence of several senior personnel to edge out Japan 39-31 in a fluctuating summer Test as supporters returned to the Aviva Stadium for the first time in 17 months.
With seven of their contingent on British and Irish Lions duty and captain Johnny Sexton, plus Keith Earls and Cian Healy, rested, there was a fresh look to the hosts in their first meeting against Japan since the 2019 World Cup.
On that occasion, Japan pulled off an all-time shock in the pool stages and they threatened a repeat in Dublin, where around 3,000 spectators were in attendance at the venue for the first time since February last year.
It was a lacklustre and error-strewn first half from the Irish but they went in at the interval 19-17 ahead courtesy of tries from centre pairing Chris Farrell and Stuart McCloskey and tighthead prop Finlay Bealham.
Flanker Josh Van Der Flier and wing Jacob Stockdale went over after the break while Joey Carbery's four conversions were followed by two penalties that ultimately took the wind out of the sails of Japan, whose tries came from Michael Leitch, Timothy Lafaele, Siosaia Fifita and Naoto Saito, with Yu Tamura adding 11 points with the boot.
While they led on several occasions, including a 24-19 advantage in the second half, Japan were ultimately left to reflect on a successive losses, having been beaten by Warren Gatland's Lions 28-10 at Edinburgh last weekend.
Eight of Ireland's starting XV had fewer than 20 caps as those on the margins were handed their chance to shine, with James Ryan taking the captain's armband, having been passed fit following an adductor injury.
However, the stand-in skipper's indiscipline at an early lineout set the tone for a sloppy start for Ireland, who conceded five penalties in the first quarter of an hour alone.
Tamura split the posts to put Japan ahead although Saito going off his feet at a ruck helped Ireland, with Caelan Doris carrying well before the ball was worked to Farrell to jink inside before bundling his way over.
But Ultan Dillane was unable to gather the ball at the restart and Japan put their opponents on the back foot, setting the maul after prevailing in the lineout, allowing Leitch to touch down as Ireland fell 10-7 behind.
Lafaele's try was chalked off as the final pass from Tamura was judged forward by the TMO before Ireland discovered some momentum to move back into the lead, a fine move started by Carbery's inventive chip and chase.
The ball was worked out to the left and Peter O'Mahony remained on his feet after colliding with Leitch before offloading to McCloskey to touch down in the corner, but a seesaw first half continued as Japan hit back.
Tamura's crossfield kick stretched Ireland's defence as Fifita collected the ball before passing on the outside to Lafaele and there was no denying the outside centre this time as he went over on the left.
Japan's error count was starting to creep up, though, and they were penalised twice for offside on the stroke of half-time, where Carbery was held up over the line before Bealham burrowed his way over for his first Ireland try.
Ireland therefore held a two-point lead despite an unconvincing first 40 minutes, but after Farrell was withdrawn following a blow to the head, Tamura's inventive grubber was taken by Fifita for Japan's third try.
But Ireland hit back almost immediately afterwards as Van Der Flier powered over the try line before Stockdale crossed the whitewash on the left, following fine work from scrum-half Jamison Gibson-Park on both occasions.
Saito showed a clean pair of heels to drag Japan back to within two points at 33-31 but back-to-back penalties from Carbery, playing in an Ireland shirt for the first time since the 2019 World Cup quarter-final defeat to New Zealand, gave his side some much-needed breathing room.
Japan were unable to mount another comeback as Ireland claimed their fourth consecutive victory. They will now turn their attentions towards their second and last summer Test against the United States next Saturday, with the attendance capped at 6,000 fans.