Wales qualified for the Rugby World Cup quarter-finals as Josh Adams scored a hat-trick to earn Warren Gatland's side a 29-17 success over Fiji in Oita.
The Fijians raced into a 10-0 lead thanks to tries from Josua Tuisova and Kini Murimurivalu inside the opening eight minutes, but Adams' first two scores - each converted by Dan Biggar - meant Wales led at the interval of an action-packed contest that featured a slew of disallowed tries and yellow cards.
A penalty try nudged Fiji back in front before, after Rhys Patchell levelled matters with a long penalty, Adams sealed his treble on the hour mark following brilliant work from Jonathan Davies.
Liam Williams' bonus-point try made sure of the victory which is likely to pave the way for Wales to clinch top spot in Pool D, while Fiji's defeat meant they were eliminated and guaranteed Australia would go through to the final eight.
It was Fiji who flew out of the blocks in a wild first half that featured four tries, another quartet of disallowed scores and a trio of yellow cards.
Tuisova was the first to go over with a fine solo effort as he barged past Adams before holding off Biggar and Josh Navidi to reach for the line and dot down.
Both teams then had scores ruled out - Wales' try through Navidi chalked off due to a knock-on before the TMO spotted a forward pass prior to Frank Lomani going in.
Fiji may not have got a second try there but they did gain a man advantage as Ken Owens flipped Viliame Mata onto his back in the build-up to earn a sin-binning, with Murimurivalu bouncing off Adams and rolling over the line to make it 10-0.
Ben Volavola missed his second conversion, though, and a shoulder-led charge from Tevita Cavubati at a ruck meant he was also sin-binned.
Adams took advantage by collecting Biggar's kick to get Wales on the board and he thought he had a second shortly after, only for the TMO to rule that out as his left foot just went into touch thanks to a brilliant Lomani tackle.
Relentless Welsh pressure resulted in Semi Kunatani being yellow-carded and Wales made use of men over on the left as Adams went in again, with Biggar crucially remaining perfect with the boot.
There were further Fijian tries disallowed either side of the interval for forward passes, but they did regain the lead 13 minutes into the second half from a penalty try, which came following a driving maul shortly after James Davies' caution left Wales undermanned.
A nasty collision between Biggar and team-mate Williams resulted in the former going off, with Patchell coming on and duly slotting over a 42-metre penalty to make it 17-17.
Then came the moment of the match, Davies dumping Jale Vatubua down with a brilliant hand-off and then flipping the ball out to Adams as he was tackled, the wing having the awareness to stay in touch and complete his hat-trick.
A ragged Fijian defence then allowed Gareth Davies to burst through a gap and set up Williams to seal the bonus point.
Fine finishing means Adams steals the show
Both of Fiji's early scores came down Adams' flank, with the wing unable to stop Tuisova and Murimurivalu, but he bounced back in style at the other end.
He narrowly missed out on a first-half hat-trick but got his treble after the break when he displayed the foresight to stay in support of Jonathan Davies, avoid touch, and remain low to burrow in. His fine finishing was the difference.
Ill-discipline costs Fiji
Both teams received two yellow cards apiece. Cavubati's ridiculous dive at a ruck, when Fiji were 10-0 up and Wales were a man down, handed Gatland's side a route back.
The Fijians then lost their shape defensively to allow Gareth Davies to tee up Williams and seal their fate with 12 minutes to go. Fiji will return home feeling this is one that got away.
Key Opta stats
- Wales have won all three of their pool-stage games so far at this Rugby World Cup, with one still to come. Not since 1987 (three wins from three) have they won all their matches in the pool stage of the tournament.
- The four yellow cards in this game matches the most ever shown in a Rugby World Cup fixture, with the tally previously unique to the 2015 clash between Georgia and Namibia.
- Adams became the sixth Wales player to score a hat-trick in Rugby World Cup history and the fifth player from any nation to manage that at this year’s tournament.
- Alun Wyn Jones made his 140th Test appearance, overtaking George Gregan (139) to go fourth on the list of the most capped players in men’s international rugby. It was also his 18th Rugby World Cup appearance, equalling Gethin Jenkins’ record for Wales.
- Josua Tuisova scored his sixth try for Fiji, with those tries coming in his last seven Tests. Fiji had never previously lost when he had scored a try in a match.
Wales, who face Uruguay next, are in pole position to top the pool and set up a quarter-final clash with France or England. Fiji's campaign is over following defeats to Australia, Uruguay and Wales.