Tokyo - Wales have suffered a Rugby World Cup hammer blow before Sunday's semi-final against South Africa with star fullback Liam Williams ruled out for the rest of the tournament through injury. 

Coach Warren Gatland named Leigh Halfpenny as his replacement on Friday after Williams damaged his ankle in a collision during training in midweek. 

Williams, who has 62 caps for Wales, has no chance of returning in time for the final against New Zealand or England should the Six Nations champions overcome the Springboks in Yokohama this weekend. 

"He's undoubtedly a big loss from an attacking perspective and what he's achieved in the game over the last year or so - he's a world-class player," said Gatland, who made three changes to the starting XV that squeezed past France 20-19 in the quarter-finals. 

"But to bring in someone with the experience of Leigh Halfpenny gives us a different element. We had a long debate over whether to start Leigh in the first place and move Liam to the wing," he added, describing Halfpenny as one of the best defensive fullbacks in the world.

"It's a change, but I don't think we're weakened in any way."

South Africa assistant coach Mzwandile Stick, responding to Williams's withdrawal, said: "It's a big blow for them, but they are replacing him with another world-class player in Leigh Halfpenny.

"It's going to be a tough challenge for us as we know he has a good boot and a good running game. But we will be well prepared come Sunday."

Meanwhile, Gatland promised an improved Welsh performance after struggling to put away 14-man France last weekend.

"I'm really excited about where we are at this moment," said the New Zealander, who is set to bring the curtain down on a successful 12 years as Wales coach after the tournament.

"I've got two games to go as Welsh coach and I really want to enjoy those games. We've got a chance to do something special. Those chances come along rarely in life and when they do you've got to grab them with both hands."

South Africa have also lost a key player for this weekend's clash in Yokohama with their jet-heeled wing Cheslin Kolbe failing to recover from an ankle problem. 

Wales, whose only defeat by South Africa in their last six meetings was in the 2015 World Cup quarter-finals, welcome back Jonathan Davies from injury at outside centre. 

Owen Watkin drops to the bench, while Ross Moriarty replaces the injured Josh Navidi (hamstring) at eight, with Halfpenny set to earn his 85th cap. 

Meanwhile, scrumhalf Gareth Davies will mark his 50th appearance for Wales as he continues his halfback combo with Dan Biggar. 

Talismanic captain Alun Wyn Jones racks up his 142nd Test cap - for Wales and the British and Irish Lions combined - to equal Sergio Parisse's record for a Six Nations player. 

Only All Blacks legend Richie McCaw has more with 148. 

South Africa, who broke the hearts of hosts Japan last week, have never lost to Wales at a World Cup and many pundits make the two-time world champions favourites again - much to Gatland's delight.

"If they continue to do that over the next couple of days, that will be brilliant," he said.

"It does get us up when people write us off."

Gatland, who predicts a "kicking fest" in Yokohama, was daring to dream with Wales on the brink of a first World Cup final.

"It won't be the prettiest game in the world," he smiled.

"I feel like we continually punch above our weight, but for us to get the final would be one hell of an achievement."

Welsh skipper Jones added: "You can get burnt by the magnitude of the occasion. The emotional rollercoaster is a pretty tough one - but we've earned the right to be here this week."

Kick-off is as 11:00 (SA time) on Sunday.

Teams:

South Africa

15 Willie le Roux, 14 S'bu Nkosi, 13 Lukhanyo Am, 12 Damian de Allende, 11 Makazole Mapimpi, 10 Handre Pollard, 9 Faf de Klerk, 8 Duane Vermeulen, 7 Pieter-Steph du Toit, 6 Siya Kolisi (captain), 5 Lood de Jager, 4 Eben Etzebeth, 3 Frans Malherbe, 2 Bongi Mbonambi, 1 Tendai Mtawarira

Substitutes: 16 Malcolm Marx, 17 Steven Kitshoff, 18 Vincent Koch, 19 RG Snyman, 20 Franco Mostert, 21 Francois Louw, 22 Herschel Jantjies, 23 Frans Steyn

Wales

15 Leigh Halfpenny, 14 George North, 13 Jonathan Davies, 12 Hadleigh Parkes, 11 Josh Adams, 10 Dan Biggar, 9 Gareth Davies, 8 Ross Moriarty, 7 Justin Tipuric, 6 Aaron Wainwright, 5 Alun Wyn Jones, 4 Jake Ball, 3 Tomas Francis, 2 Ken Owens, 1 Wyn Jones

Substitutes: 16 Elliot Dee, 17 Rhys Carre, 18 Dillon Lewis, 19 Adam Beard, 20 Aaron Shingler, 21 Tomos Williams, 22 Rhys Patchell, 23 Owen Watkin