Louis Rees-Zammit scored a second-half hat-trick of tries to help Wales to a 43-19 victory over Georgia in Nantes on Saturday to finish top of Pool C at the Rugby World Cup.
Wales will now play the winners of the showdown between Argentina and Japan, who play in Nantes on Sunday, in the quarter-finals in Marseille next weekend.
Warren Gatland's team came into the game at a sun-kissed Stade de Beaujoire needing just a point to guarantee top spot in Pool C and made no mistake of the bonus-point win, albeit laboured and pedestrian at times.
The victory extended to eight Wales' winning streak in pool matches, but consigned Georgia — who registered a 35-15 loss to Australia, an 18-18 draw with Portugal and a 17-12 defeat by Fiji — to fourth-placed finish in the pool which means they miss out on an automatic qualification for the 2027 World Cup.
A cagey opening spell saw both teams opting to kick as they tested each other out.
A Tommy Reffell turnover spurred Wales' first proper chance of crossing the Georgian whitewash, Sam Costelow tackled into touch as the ball was worked left.
Tomas Francis was on hand to crash over from short range after a kick to the corner, Costelow converting.
Georgia roared back up the pitch, flanker Beka Saginadze bouncing off three tackles like a wrecking ball before the attack was snuffed out.
Rio Dyer's fine chase and tackle on Lasha Khmaladze saw Georgia concede possession and from a penalty Costelow's precision-perfect pass found Liam Williams in space, the full-back stepping his way over the line.
Costelow converted and then kicked a penalty to stretch Wales' lead to 17 unanswered points.
Georgia were not done, however, skipper Merab Sharikadze, back at centre in one of five changes from last week's loss to Fiji, barrelled his way over under the posts. Luka Matkava kicked the extras to leave it 17-7 at half-time.
Wales struck within two minutes of the restart, George North picking up a stray Georgian pass to feed Rees-Zammit for an easy run-in.
Akaki Tabutsadze was just bundled into touch as Wales failed to get a proper grip on the match, the winger then sparking down the left flank as Georgia pressed.
They had their just desserts when Vano Karkadze was driven over as the ball was recycled from a driving maul.
Shortly after Davit Niniashvili broke clear of the Welsh defence to cross for Georgia's third try and thoughts of that infamous 2007 World Cup loss to Fiji, also in Nantes, resurfaced.
Costelow missed a long-range penalty, but converted a second try by Rees-Zammit, the winger settling Wales nerves after latching on to a clever Williams chip over a stretched Georgian defence.
French referee Mathieu Raynal then brandished yellow cards for Taine Basham and Niniashvili after the replacement Wales flanker went in high, an act that sparked an all-in push and shove.
Rees-Zammit was awarded a third try after chasing a grubber, although he had looked to have knocked the ball on.
George North put the cherry on the cake with a late try to leave Wales top of their World Cup pool for the fourth time in World Cup (1987, 1999, 2019).
Of more concern to Gatland could be injuries to emblematic No 8 Taulupe Faletau and Williams, while Costelow was a late starter in place of Gareth Anscombe, who picked up a groin injury in the warm-up.