Wales have finished top of Rugby World Cup Pool D and will face France in the quarter-finals after a 35-13 win over Uruguay in Kumamoto.
Flanker Justin Tipuric captained a much-changed Wales team as the Six Nations champions took on World Cup opponents Uruguay in Kumamoto.
Wales head coach Warren Gatland made 13 switches from the side that beat Fiji four days ago, including starts for the likes of wing Hallam Amos, hooker Ryan Elias and lock Adam Beard.
Wales needed victory to win Pool D and confirm a quarter-final clash against France.
A minute's silence was observed before the anthems as a show of solidarity with everyone affected by Typhoon Hagibis.
When the game started, Wales showed plenty of attacking intent, with Tipuric and wing Josh Adams prominent.
Flanker Aaron Shingler almost went over in the corner for a try, but Uruguay were struggling to cope with mounting pressure, and prop Nicky Smith claimed a 17th-minute touchdown that Leigh Halfpenny converted.
Wales did not have it all their own way as Uruguay combined some strong defence with attacking ambition, and fly-half Felipe Berchesi opened their account by kicking a 22nd-minute penalty.
Wales should have scored a second try shortly afterwards when Amos breached Uruguay's defence, but it was disallowed following a forward pass by centre Hadleigh Parkes.
It was poor play by Parkes, and Wales could not establish any rhythm to their game, leading by just four points entering the final 10 minutes of a disjointed first-half.
Uruguay ended the first 40 minutes deep inside Wales territory, and Berchesi kicked a second penalty, making it 7-6 at the break.
Wales had wasted a number of attacking opportunities, and they could have few complaints at the scoreline.
Halfpenny hit the post with a long-range penalty attempt, but Wales increased their lead after 46 minutes.
Sustained pressure ended with Adams claiming his fifth touchdown of the tournament, and Halfpenny's conversion opened up an eight-point lead.
It was better from Wales, but they still found it difficult cracking a spirited and organised Uruguay team.
Uruguay flanker Santiago Civetta was sin-binned for a technical offence 15 minutes from time, and Wales were awarded a penalty try shortly afterwards by referee Angus Gardner.
Although Uruguay claimed a deserved touchdown from hooker German Kessler that Berchesi converted, Wales secured a bonus point when substitute scrum-half Tomos Williams darted over, with Halfpenny converting.
Wales had a five-point maximum sewn up, but Amos then dropped the ball as he dived to cross Uruguay's line.
It summed up a lot of Wales' performance, but Gareth Davies then added a fine solo try that Halfpenny converted as they triumphed 35-13 and now move on to a World Cup quarter-final against France in Oita next Sunday.