The Duke of Cambridge and the Duke of Sussex  have praised Gareth Thomas after the former Welsh rugby star revealed he is HIV positive.

Thomas, who came out as gay in 2009, is thought to be the first UK sportsman to go public about living with the virus, and has revealed he was driven to suicidal thoughts as a result of his diagnosis.

William and Harry joined those backing the 45-year-old, who completed a 140-mile triathlon on Sunday.

View this post on Instagram

“Gareth, you are an absolute legend! In sharing your story of being HIV+, you are saving lives and shattering stigma, by showing you can be strong and resilient while living with HIV. We should all be appalled by the way you were forced to speak your truth, it is yours and yours alone to share on your terms and I and millions stand with you.” – H • A lot of you will know who Gareth Thomas is, but many of you may not. This retired welsh rugby player, father, husband, role model – today revealed he is HIV positive. In his statement he shares: Hello, I’m Gareth Thomas 🏉🏴󠁧󠁢󠁷󠁬󠁳󠁿 and I want to share my secret with you. Why? Because it’s mine to tell you. Not the evils that make my life hell, threatening to tell you before I do. And because I believe in you, and I trust you. I am living with HIV. Now you have that information, that makes me extremely vulnerable, but it does not make me weak. Now even though I’ve been forced to tell you this, I choose to fight, to educate and break the stigma around this subject. And that begins today, when I take on the toughest Iron Man in the world in Tenby 🏴󠁧󠁢󠁷󠁬󠁳󠁿 and I push myself physically to the limits. I’m asking you to help me to show that everyone lives in fear of people’s reactions and opinions, but that doesn’t mean we have to hide. But to do this, I really really need your support. @gareththomasofficial #YourRaceYourVictory Photo©️Rowan Griffiths/Sunday Mirror

A post shared by The Duke and Duchess of Sussex (@sussexroyal) on

In an Instagram post, Harry said: “A lot of you will know who Gareth Thomas is, but many of you may not. This retired welsh rugby player, father, husband, role model – today revealed he is HIV positive. ”

He said:  “Gareth, you are an absolute legend! In sharing your story of being HIV+, you are saving lives and shattering stigma, by showing you can be strong and resilient while living with HIV. We should all be appalled by the way you were forced to speak your truth, it is yours and yours alone to share on your terms and I and millions stand with you.” – H

William used his Kensington Palace Twitter account to retweet Thomas’s video explaining why he went public.

He wrote: “Courageous as ever – legend on the pitch and legend off it. You have our support Gareth. W”

Support has also come from Labour leader Jeremy Corbyn, who said Thomas was a “role model”, while rugby referee Nigel Owens said he was “brave”.

Ian Green, chief executive at the Terrence Higgins Trust HIV charity, said Thomas’s diagnosis may help change public attitudes.

“I’m very proud to call Gareth Thomas a friend. Gareth is proof that an HIV diagnosis shouldn’t stop you from doing anything you want to do – whatever that is.

“I hope that by speaking publicly about this Gareth will transform attitudes towards HIV that are all too often stuck in the 1980s.”

Mr Green said improving treatment “means that people living with HIV like Gareth now live long healthy lives”.

“This is exactly the kind of information Gareth wants to get out there to challenge the stigma that still surrounds this virus.”

Mr Green said that Thomas blazed a trail by being the first rugby player to come out as gay and “has done so much to encourage inclusion and diversity within the sport”.

He added: “Now he is doing that once again with HIV and taking on the challenge of a lifetime in Ironman Wales to show that this virus doesn’t need to be a barrier when you’re diagnosed and accessing treatment.”

Many people used social media to show their support for Thomas after he told his story to the Sunday Mirror.

Mr Corbyn said: “Gareth Thomas has again shown enormous strength in declaring himself HIV positive.

“A role model challenging stigma and prejudice.”

And Mr Owens said: “Stay strong my friend and as always well done for being so brave and speak about these important issues that affect so many and will help even more.”

For confidential support call the Samaritans on 116123, or visit a local Samaritans branch.