Jack Bobridge has said he took cocaine days before competition.
The double Olympic silver medallist was charged two years ago with drug dealing, and is currently appearing in the Western Australian District Court accused of being involved in the supply of ecstasy between March and July 2017.
Now 29-years-old, Bobridge told the court that he took cocaine with two Australian team mates only days before competing in Europe.
When questioned, he admitted that he knew the drugs would still be in his system during competition, Nine News reports from Australia.
Giving an emotional account, he said that he had been diagnosed with arthritis and was using drugs to manage pain.
However, the prosecution accused Bobridge of using the story to hide a drug deal that he was allegedly organising, with witness and former pro rider Alex McGregor.
McGregor allegedly received a Facebook message from Bobridge which said: “Remember to keep last night all strictly between us bro.”
Bobridge, who competed at the Olympics in Beijing, London and Rio De Janeiro, denies that the message was about a plan to sell drugs, instead claiming that it referred to the drug taking with other riders.
McGregor says he met Bobridge through cycling in 2014, and that the relationship went from a friendship to “selling drugs together”, adding “it pretty much went to the extreme”.
He claims that the pair first made a “deal” to sell ecstasy pills in the clubbing scene in Perth after staying up drinking with each other in the early hours of March 2017.
Bobridge allegedly supplied drugs to former rider McGregor, who then passed them on to an undercover policeman.
The policeman paid $300 for the drugs and then stayed in contact with McGregor, purchasing pills on a further three occasions over the next few months.
Bobridge has pleaded not guilty to four counts of supplying MDMA and McGregor will continue to give evidence as the trial continues.