Australian diver Matthew Mitcham has announced his retirement from the sport.

The 27-year-old diver came out before the Beijing Olympics back in 2008, revealing that his partner would be travelling to China to watch him dive at the event.

It paid off – in Beijing he smashed the record for the highest single-dive score in Olympic history, and picked up a gold medal for the 10m platform dive.

The diver – who picked up a gold medal at the Commonwealth Games in 2014 – was only the second openly gay diver to win gold, behind Greg Louganis.

Announcing his retirement this week, Mitcham wrote in an Instagram post: “It’s official: I have decided to finally retire after a looooooooong but very rewarding diving career.”

Paying tribute to his long-suffering partner, he added: “I remember the support I got when I came out before my Olympic debut in 2008 and it helped me to keep sharing my story just as candidly.

“So, it’s Peace Out to my diving career and a big Heeeeeeey to the rest of my media and entertainment and everything else career!”.

In an interview with ABC, Mitcham elabourated on his decision to call it quits.

He said: “I’ve tried to make this call so many times before and it just never stuck. I was totally committed to retiring after the Commonwealth Games in 2014 and then I ended up doing a lot better than expected with my partner and I entertained the thought of sticking it out for another two years.

“I feel pretty special. I’m very, very grateful for all of my experiences in diving with all of its ups and downs and highs and lows and wins and bombs, all of it, that’s what makes an experience really three dimensional – the good stuff as well as the bad.

“Even with any of the lows that I had, I still reflect on my diving career with extreme wonder and gratitude and nostalgia.”

Of being a strong openly gay role model, he revealed he gets many letters from people who say he has helped them come to terms with their own sexuality.

He said: “I’ve had lots of messages like that which is really humbling. Not just from younger people but also older people … who have been keeping a deep dark secret for their entire lives, and just me being able to be who I was and compete at an Olympics as an out-and-proud athlete really inspired them to really be their authentic self.”