(Reuters) - American double Olympic champion Conor Dwyer on Friday said he was retiring from swimming on the day he was handed a 20-month doping ban that ruled him out of next year’s Tokyo Olympics.

FILE PHOTO: 2016 Rio Olympics - Swimming - Victory Ceremony - Men's 200m Freestyle Victory Ceremony - Olympic Aquatics Stadium - Rio de Janeiro, Brazil - 08/08/2016. Conor Dwyer (USA) of USA poses with his bronze medal. REUTERS/David Gray

The U.S. Anti-Doping Agency (USADA) earlier announced that an independent three-member panel of the American Arbitration Association (AAA) determined the suspension after Dwyer was found to have had testosterone pellets inserted in his body.

Dwyer, 30, tested positive for an anabolic agent in three out-of-competition urine samples last November and December, USADA said in a news release.

“Following a full evidentiary hearing, the panel found that Dwyer had testosterone pellets inserted in his body in violation of the rules,” USADA said.

Dwyer said he was following a doctor-prescribed medical treatment that he did not realise contained the banned substance testosterone and noted that the panel said in its report that he was not significantly at fault for the violation.

“My doctor assured me that the United States Olympic Committee had approved the treatment before I agreed to it,” he said in a statement.

“Absent of these assurances, I never would have agreed to this medically necessary treatment.

“Regardless of the result of the arbitration ruling, I have decided to retire from swimming to pursue other professional interests.

“It was an honor to represent my country alongside my team mates and with the support of my coaches, family, and friends.”

Dwyer was part of the U.S. 4x200m freestyle teams that won gold at the 2012 and 2016 Olympics. He also claimed bronze in the individual 200 freestyle at Rio in 2016.

USADA CEO Travis Tygart said: “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.

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

Dwyer’s 20-month ban began on Dec. 21 last year, the date of his provisional suspension.