LA Galaxy defender Robbie Rogers, the first openly gay male athlete to compete in a major North American professional sports league, has announced his retirement.

The 30-year-old, capped 18 times by the United States and a 2008 Olympian, publicly revealed his sexuality shortly after leaving Leeds in February 2013.

He also announced his retirement from the game at the same time, aged 25, but four months later joined Major League Soccer side the Galaxy.

Now, after 11 years as a professional, the former Heerenveen and Columbus Crew player has said he is hanging up his boots for good after suffering an ankle injury.

He said in a statement on lagalaxy.com: “It is with mixed emotions that I announce my retirement from the game of soccer.

“It is through this game that I have experienced some of my greatest achievements both professionally and personally.”

When he publicly came out as gay four years ago, Rogers wrote on his blog that he had been afraid of revealing his sexuality, and that he wanted to live a new life outside of the game.

Writing on his Instagram account on Tuesday, Rogers says he regretted not embracing his sexuality sooner.

He wrote: “As a young boy I dreamed of becoming a professional soccer player and representing my country in front of the world.

“But as a teenager I grew more and more consumed by fear and shame. And sadly, at some point the scared kid inside me decided that pursuing my dream meant sacrificing a part of myself and hiding my sexuality from the world instead of embracing it.

Rogers issued an Instagram statement to admits he wished he came out as gay sooner (Getty)

“My only regret in my 11-year career are the years I spent in the closet. I wish I could have found the courage that so many young individuals have shared with me in the past five years to live honestly and openly as a gay person.

“These are the young people that inspired me to overcome my fears and return to playing. They're still the kids that send me letters every week. To those kids, I say thank you. My proudest accomplishment in my career is helping to create a more open sport for you.”