Former Wales star Jonathan Davies hailed a “fantastic effort” from Warren Gatland’s team after they were agonisingly beaten by South Africa in the Rugby World Cup semi-final.

Wales battled to the end in Yokohama only to have their dreams dashed by a late Handre Pollard penalty as the Springboks won 19-16 to book their final spot against England next weekend.

Davies tweeted: “Congratulations @Springboks Well done @WelshRugbyUnion fantastic effort. Enjoyed the RWC journey, you all should be very proud.”

Former Wales and Lions wing Shane Williams wrote: “Absolutely gutted for the lads but they give it their all I can promise you!”

And Martyn Williams said the “whole country” should be proud of how a “patched up” Wales team had performed.

He wrote: “What an effort…whole country should be proud of that group of players…patched up team but pushed South Africa all the way.”

Scarlets were among the Welsh teams tweeting their reaction to the result, as tweeted: “Agony for Wales, but they have done the nation proud”

Elsewhere in the sporting world, Wales and Juventus midfielder Aaron Ramsey said the team should be “very proud” of their performance at the tournament.

He wrote: “Great effort boys, not our day but pushed them right till the end. Should be very proud”

Former Wales striker John Hartson tweeted: “Brave fight from Wales.. what a sickner.”

Prince William described the performance as “heroic” in a message sent from the official Kensington Palace Twitter account.

He wrote: “A Heroic performance @WelshRugbyUnion, unfortunately this time it wasn’t meant to be. @AlunWynJones – brilliant leadership as ever. You can all hold your heads high from an incredible tournament, we’re all so proud of you.”

Welsh First Minister Mark Drakeford tweeted: “Not the result we hoped for, but couldn’t be more proud of our boys!”

And Labour leader Jeremy Corbyn wrote: “Heartbreaking for @WalesRugbyUnion in the semi-final, they gave it everything against South Africa but it just wasn’t to be. They’ve done themselves proud.”

Soth Africa will go on to meet England in the final in Yokohama next Saturday, while Wales face a third-place play-off against New Zealand in Tokyo the day before.