Robbie Rogers only came out after he left England (Jeff Gross/Getty)

LA Galaxy defender Robbie Rogers, who is the only openly gay man in North American football, has announced he is retiring from the pitch.

The 30-year-old star is hanging up his boots after suffering an ankle injury, and has shared that the only regret he has about his career is spending 11 years in the closet.

Rogers, who came out after leaving Leeds in February 2013, said that his “proudest accomplishment” was “creating a more open sport.”

“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,” said Rogers in a statement.

“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,” he added.

Rogers, who has been capped eighteen times during his history in the US, said that his teammates accepted him “from the first day I stepped back into the locker room.”

“I would like to thank [former Galaxy coach] Bruce Arena for encouraging me to return to professional soccer after I came out as a gay man. I’d also like to thank all of my LA Galaxy team-mates for accepting me from the first day I stepped back into the locker room at StubHub Center,” he said.

“Finally, I’d like to thank the fans for their continued support throughout my career. I’ll never forget the feeling of returning to the field in my first game back. Having the opportunity to win an MLS Cup in my hometown, with my hometown club as an openly gay man will be something I will carry with me for the rest of my life,” he added.

In an Instagram post announcing his retirement, Rogers opened up about his struggle to come out in the spotlight.

“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.

There are still serious issues regarding how LGBT footballers are supported in football.

Justin Fashanu, who is still the only English footballer to have come out during his career, committed suicide at the age of 37.