Swimmer Conor Dwyer, a two-time Olympic gold medalist, was issued a 20-month ban for testing positive for an anabolic agent, according to the U.S. Anti-Doping Agency. The suspension prematurely ended his hopes for a third Olympic appearance and prompted the decorated swimmer to announce his retirement.

USADA said in a statement Friday that Dwyer, 30, tested positive in three out-of-competition tests in 2018, and a three-member panel of the American Arbitration Association “found that Dwyer had testosterone pellets inserted in his body.”

Dwyer was a part of the United States 4x200 relay teams that won gold at the 2012 London Games and again four years later at the Rio Olympics. He also won an individual bronze at the 2016 Games in the 200-meter freestyle race. He’d qualified for this year’s world championships, which took place in July, but was removed from the U.S. roster with no explanation and did not compete in Gwangju, South Korea.

According to the arbitration panel’s ruling, Dwyer did not dispute that he had the pellets surgically implanted. According to the panel's final ruling, Dwyer returned home from the Rio Olympics three years ago and “for many months, he had been suffering from health issues such as brain fog, low mental and physical energy, difficulty sleeping, depression and anxiety.”

He eventually underwent a hormone replacement therapy and had the pellets surgically implanted in October 2018. The panel wrote that “he was not concerned with his swimming performance, but rather his overall mental health and well-being."

Dwyer didn't realize at the time that the procedure violated anti-doping policies and would result in a positive test, according to the panel’s findings.

Shortly after USADA issued its statement Friday afternoon, Dwyer on Instagram announced his retirement from the sport.

View this post on Instagram

Today i’m announcing my retirement from professional swimming. It has been an incredible ride and I have accomplished more than my wildest dreams. It was an honor to represent my country alongside my teammates. Thank you to my coaches for teaching me that you can achieve anything if you out work everyone. To my mom who taught me how to swim, to my parents who took me to swim practice when it was 5am and subzero in Chicago and sacrificed so much for me because they believed in me and my dreams. Thank you to all my siblings and cousins for never missing a single meet, for being my rock throughout this unforgettable ride. To all the friends and teammates that have been there, old and new, I cherish every moment and memories we have made throughout the years. I have always felt that swimming chose me- it has and will always have a very special place in my heart. This is an unfortunate end to an incredible chapter of my life. I believe that things happen for a reason, and I can’t wait to share with you all the next chapter of my life.

A post shared by Conor Dwyer (@conorjdwyer) on

“It has been an incredible ride and I have accomplished more than my wildest dreams,” he wrote. “It was an honor to represent my country alongside my teammates. … This is an unfortunate end to an incredible chapter of my life. I believe that things happen for a reason, and I can’t wait to share with you all the next chapter of my life.”

In a statement Friday evening, Dwyer said he made “an honest and unfortunate mistake,” and said his physician had assured him the treatment was legal.

“Absent of these assurances, I never would have agreed to this medically necessary statement,” he said.

Dwyer’s 20-month ban is retroactive to December 2018, which means he wouldn’t be able to return to the competition until after the Tokyo Games.

“As noted in the Panel’s decision, USADA is independent of sport and here to help athletes ensure they compete clean and protect their health and well-being within the rules,” Travis Tygart, USADA’s chief executive, said in a statement. “It’s frustrating that Mr. Dwyer did not take advantage of this support and hopefully this case will convince others to do so in order to protect fair and healthy competition for all athletes.”

Read more: