Left winger Josh Adams scored a hat trick of tries — and had another ruled out — as Wales rallied to reach the Rugby World Cup quarter-finals beating Fiji 29-17 in a pulsating Pool D match.
The Six Nations champions hit back from 10-0 down and meets either England or France in the quarter-finals.
The Flying Fijians are taking the plane home but going out in style.
Only five points separated them with about 10 minutes left, until fullback Liam Williams gave Wales breathing space with a converted try. Centre Jonathan Davies created it with a brilliant backhand offload.
Earlier in the second half, his younger brother James Davies got sin-binned on his World Cup debut at flanker.
It was a chaotic match.
The first half produced seven tries, but only three were given.
Referee Jerome Garces referred five to video review, of which three were ruled out — two by Wales, one by Fiji.
Another try, scored by Fiji No 8 Viliame Mata late in the half, didn't need the TMO because the forward pass to him was so evident.
Adams crossed three times in the first half, but one got chalked off. So was a try by Wales flanker Josh Navidi disallowed.
The two Fiji first-half tries that counted went to right winger Josua Tuisova and fullback Kini Murimurivalu inside eight minutes, by which time Fiji scrumhalf Frank Lomani had one ruled out by TMO after a forward pass from left winger Semi Radradra.
Added to that, there were three first-half sinbins: Two for Fiji, after Wales hooker Ken Owens got his early on for dangerously launching Mata over his shoulder.
The restart saw the TMO used yet again, this time denying Radradra a try in the left corner because of a forward pass from Murimurivalu.
Mindful of needing four tries and a bonus point, Fiji stormed forward again and, after Wales flanker James Davies got the game's fourth yellow card, Fiji took a lineout and speared Wales with a huge driving maul for a penalty try.
Wales flyhalf Dan Biggar, who converted his side's first-half tries, went off for a head injury assessment during the new half. He also went off for an HIA during the 29-25 win against Australia, and was recently cleared to play this match.
His replacement, Rhys Patchell, booted over a long penalty to level the match with about 20 minutes remaining.
Ten minutes later, the elder Davies launched Adams into the left corner.
Try, Mister Garces?
Yes, but only after another TMO confirmed Adams was in bounds.
Patchell's conversion attempt missed.
When Williams ran clear, the red-shirted Welsh hordes could finally roar with relief.
Wales 29 (Josh Adams 3, Liam Williams tries; Dan Biggar 2 conversions, Rhys Patchell conversion, penalty)
Fiji 17 (Josua Tuisova, Kini Murimurivalu tries; penalty try).