Ireland finally overcame a thrilling Japan side in a contest which swung frantically to and fro in front of 3,000 spectators at the Aviva Stadium.

It was the first time Ireland had played in front of fans since the victory over Wales in the 2020 Six Nations and the limited attendance was treated to a wonderfully entertaining match, decorated by the visitors' free-flowing rugby.

While it was largely a Roundheads v Cavaliers affair, the hosts showed flashes of expansive rugby themselves, most notably for Stuart McCloskey's 26th minute try.

The tourists were hit with a blow before the off with the news that their ebullient number eight Kazuki Himeno, scorer of their try against the Lions in Murrayfield, pulled up in the warm-up and had to be replaced in the starting XV by Tevita Tatafu.

After an early Tamura penalty, Ireland were first to land a five-pointer. Ireland forsook a lineout maul, opting to shift the ball inside to Caelan Doris who made huge ground in midfield, establishing the platform for the score. After a few more phases, centre Chris Farrell used those outside as decoys, throwing a side-step and darting over from close range.

Japan players celebrate their third try

Japan hit back more or less immediately. Ultan Dillane mis-judged the re-start, allowing the ball to bounce in behind, Ireland conceding a lineout in the corner. Jamie Moore caught the resultant lineout at the back, setting in motion the perfect lineout maul, Michael Leitch the man to ground the ball for his 20th international try.

The visitors were at their rapid, scintillating best over the following ten minutes and Fifita appeared to have stretched their lead after knifing through a couple of defenders to touch down but after the on-field ref had awarded the try, the TMO alerted him to a forward pass in the lead-up and the score was chalked off.

After a period under the cosh, Ireland sparked to life on 26 minutes. Returning out-half Joey Carbery launched a counter-attack, chipping the ball over the defensive line on halfway and seizing on the awkwardly bouncing ball. After securing possession, Ireland mounted a lethal attack down the left wing, Peter O'Mahony beasting through a tackle, tossing an offload to Stuart McCloskey who touched down in the corner.

Jordan Larmour's race was run after picking up an injury on the half-hour, being replaced by Munster wing Shane Daly.

But Japan grabbed the lead again with one of the tries of the afternoon. Expertly exploiting the penalty advantage, Tamura aimed a perfect cross kick at Fifita, the wing cutting inside Daly, flipping a reverse pass to Lafaele who steamed over in the corner, evading a poor-ish attempt at a tackle from Hugo Keenan.

Trailing 17-12 in a breathless contest, Ireland snuck back in front by half-time, Finlay Bealham the one to ground the ball with the clock gone past 42 minutes after an old-fashioned forward drive.

The game continued in the same 'you score, we score' vein in the opening period of the second half.

Japan's tries only got more spectacular as time wore on. After Chris Farrell was subbed following a head-injury on halfway, the tourists struck again. On the left touchline, Tamura attacked down the narrow side of the ruck, slipped a clever little grubber inside for the arriving Fafita and the wing's momentum carried him over the line.

Once again behind, Ireland sparked to life. Following an attacking lineout, the lively Jamison Gibson-Park made a quick dart from the back of the ruck, sucking in several defenders and once the ball was recycled, Josh van der Flier heaved himself over the line for the score.

The pattern of back and forth was swiftly broken as Ireland made the decisive move in the game three minutes later. After an powerful attacking drive carried them to within five metres of the line, Gibson-Park floated a beautiful long pass to Stockdale on the left wing and the Ulster flier nipped over in the corner.

Carbery converted from the touchline and, for the first time, Ireland had a cushion in the game.

Jacob Stockdale grounding for Ireland's fifth try

The game being what it was, the cushion was soon snatched from under them, Japan rustling up yet another phenomenal score.

An off-load heavy score, Masirewa kick-started the move, drawing in two tacklers before flicking the pass away. A couple of offloads later and the scrum half Saito scampered into open country for the visitors' final try.

At 33-31, anything could happen. But Ireland successfully closed up the contest from there.

Japan, having run their bench and taken off the electric Tamura, conceding a couple of penalties at the ruck, duly punished by Carbery.

Eight points in front, Ireland saw it out from there and Farrell was able to give the subs a run, including Munster's Gavin Coombes, who earned his first cap in the final 10 minutes.

Ireland: Hugo Keenan; Jordan Larmour, Chris Farrell, Stuart McCloskey, Jacob Stockdale; Joey Carbery, Jamison Gibson Park; Dave Kilcoyne, Ronan Kelleher, Finlay Bealham; Ultan Dillane, James Ryan (capt); Peter O'Mahony, Josh van der Flier, Caelan Doris

Replacements: Rob Herring, Ed Byrne, John Ryan, Ryan Baird, Gavin Coombes, Craig Casey, Billy Burns, Shane Daly

Japan: Kotaro Matsushima; Semisi Masirewa, Timothy Lafaele, Ryoto Nakamura, Siosaia Fifita; Yu Tamura, Naoto Saito; Keita Inagaki, Atsushi Sakate, Jiwon Koo; Wimpie van der Walt, James Moore; Michael Leitch (capt), Lappies Labuschagné, Tevita Tatafu

Replacements: Kosuke Horikoshi, Craig Millar, Asaeli Ai Valu, Jack Cornelson, , Kaito Shigeno, Rikiya Matsuda, Shane Gates.