World pole vault champion Shawn Barber avoided a two-year suspension for an anti-doping violation after he inadvertently ingested cocaine when kissing a woman he met on the internet.

Barber was permitted to compete for Canada in the Rio Olympics after the liaison, which happened prior to his win at the Canadian Championships and Olympic trials in Edmonton. He was stripped of the title, but permitted to compete in Rio, where he finished 10th.

The decision was made on August 11, but published by the authorities on Thursday.

The 22-year-old posted a message on the “casual encounter” section of Craigslist seeking to have “a sexual encounter of some sort” on or around July 8, 2016, the Sport Dispute Resolution Centre of Canada heard.

(Gareth Patterson/AP)

The purpose of the post was to “find a partner for the week or weekend” as “a way to relieve stress”, the report stated.

He competed the following day, on July 9, winning the title in a Canadian record and qualifying for Rio in the process.

He was later subjected to a drugs test and informed on July 26 of an adverse finding for cocaine.

The woman involved testified at the hearing and Barber had been unaware that she had taken cocaine.

(Anthony Anex/AP)

A statement from the Canadian Centre for Ethics in Sport said: “Shawnacy Barber, an athletics athlete, was determined to be at no fault or negligence for an anti-doping rule violation.

“The athlete’s urine sample, collected during in-competition doping control on July 9, 2016, revealed the presence of cocaine.

“In response to the CCES’ notification of the adverse analytical finding, Barber promptly admitted the anti-doping rule violation and a hearing was held to determine the appropriate sanction.

“The athlete was able to successfully establish that he was at no fault or negligence; therefore, the otherwise applicable period of ineligibility for the violation was eliminated.”

(Don Ryan/AP)

Barber said in a statement: “I am obviously satisfied with the result of the hearing where I was found to have zero fault.

“I am happy to have this behind me so that I can move on with my career with a free conscience.

“At no time during my actions, did I even fathom the possibility of being able to be contaminated with cocaine. This is a learning experience that I hope other athletes can learn from as I have.”

Athletics Canada added: “We are thankful that the proper procedures recognised the presence of a prohibited substance, but also in ensuring due process to the athlete in coming to a fair and reasonable decision.

“As per the ruling Shawn will forfeit his Canadian title and Championship record established on July 9 at the Canadian Track and Field Championships.”