Canadian pole vault world champion Shawn Barber was allowed to compete at the Rio Olympics despite a positive test for cocaine that occurred after a sexual encounter with a woman that was arranged online.

Despite being among the favourites for gold, the 22-year-old from Toronto performed poorly in Brazil, barely making it through qualifying before finishing 10th.

Barber won the world title in August 2015 but has endured trying times since then. Last fall, his father and former coach, George Barber, was banned by Athletics Canada after the national track and field governing body learned of George Barber's 2007 criminal conviction on charges of having sex with a student at a U.S. high school where he was employed.

In the days before Barber was slated to jump in Rio in August, his lawyers fought for his athletic life before a doping tribunal. Barber faced a four-year ban from competition after testing positive for cocaine on July 9 at the Canadian championships in Edmonton, where he won his event and set a national record.

Barber avoided a suspension, but was stripped of his Canadian title.

The August decision, made by the Sport Dispute Resolution Centre of Canada, was only made public today.

"This has been a learning experience for Shawn, he is a young athlete learning how to compete on the field of play, and prepare away from it," Athletics Canada said in a statement.

Barber told reporters on a conference call that he didn't think his poor Olympic result had anything to do with his troubles relating to the positive test.

"I went out and did as well as I could," he said.

Ad placed on Craigslist

According to the SDRCC report, Barber's problems began with a visit to Craigslist. The night before he was to compete in Edmonton, he posted an ad, using a pseudonym, on the "casual encounter" section of the online classifieds site. Barber specified he wanted to meet a "professional" woman who was "drug and disease free." He testified that the purpose of his post was to "find a partner for the week or weekend" as "a way to relieve stress."

During his hearing, Barber acknowledged the purpose of the ad was to arrange a "sexual encounter of some sort."

According to Barber's testimony, he rejected initial replies before receiving a response from a man who attached a picture of a woman, described as a mother of two. Barber testified that he figured this would make her "more cautious, reserved" and he arranged to meet the two at an Edmonton hotel room that evening.

The woman testified that she got together with the man, who was her boyfriend at the time, at his residence in Edmonton, where she snorted cocaine in the hours before meeting Barber. She also testified that she snorted cocaine in the hotel bathroom, moments before Barber arrived.

Barber testified that he did not see any cocaine in the hotel room or see the woman take cocaine at any time. Barber chatted with the man before the woman emerged from the washroom. According to testimony, Barber and the woman kissed a number of times during a sexual encounter that lasted about 30 minutes. Barber testified that the man remained "around" the room the entire time.

Barber testified that no money was exchanged, and he left the hotel room soon after with the intention of never seeing the woman again. The next day, after competing in the Canadian championships and setting a national record, Barber was tested. On July 26, the Canadian Centre for Ethics in Sport informed Barber of his violation and proposed a four-year period of ineligibility.

"I didn't know that kissing a girl could transfer coke," Barber said on the conference call. "I didn't know I could test positive.

'Complete shock'

Barber said that the positive test was a "complete shock," testifying that in the two weeks before the positive test he was never around cocaine or at party where cocaine was present.

Barber's lawyer, Paul Greene, argued there should be no ban because of the so-called "no fault" rule. Greene pointed to the case of tennis player Richard Gasquet, who claimed he tested positive for cocaine after kissing a woman he had met at a club. The ruling in that case concluded that Gasquet couldn`t have reasonably known he was at risk of ingesting cocaine by kissing the woman.

Greene argued that Barber's case was the same and Barber acted without fault or negligence. The lawyer said that Barber took precautions by seeking someone who was disease- and drug-free. He also said Barber assessed the woman's character, he refused a drink, and that no cocaine was visible in the room. Green argued it was "impossible" for Barber to know that, by kissing the woman, he could test positive for cocaine.

Barber told reporters he doesn't regret how he arranged the encounter.

"Online dating, online encounters, those are kind of the future," he said. "And people that were around trying to date 15 years ago, they didn't have the same luxury. But this is 2016 and this is the way things are going for us."

The Canadian Centre for Ethics in Sport took a different view of Barber's behaviour, arguing that he didn`t do all he could that night to protect against a positive drug result.

The CCES noted that, unlike in the Gasquet case, Barber solicited his rendezvous though an online ad, "creating a suspicious and risky situation that led to the transfer of cocaine." It also pointed out that, in the Gasquet case, the athlete was with the woman from about 9 p.m. to 5 a.m. In Barber's case, he was with her for only a few moments before they started kissing. The CCES stressed this was a "premeditated effort by Barber to have a sexual encounter with a stranger in a hotel room." Softening its initial request for a four-year suspension, the CCES asked the arbitrator to impose a ban of at least a year.

Arbitrator Ross Dumoulin sided with Barber, clearing the way for him to compete in Rio days later, though Barber was stripped of his victory at the Canadian championships because of the positive test.

Dumoulin accepted Barber's no-fault argument, stating that the pole vaulter "had no way of knowing and had no reason to suspect" the woman had ingested cocaine before their sexual encounter. The arbitrator pointed to Barber's ad specifications and the fact that no cocaine was seen in the room as mitigating factors.

The arbitrator also added that Canadian athletes are held to a "higher standard" and Barber has another chance to aim higher.

"We have some different standard that we have to live up to, but you have to keep those standards in perspective," Barber told reporters. "At the end of the day we all... try to live our lives outside of the nine months of travel that our job requires of us."