TORONTO — World champion pole vaulter Shawn Barber says a tryst with a woman he met on Craigslist led to a positive doping test for cocaine.

The 22-year-old from Toronto tested positive for trace amounts of the drug prior to the Rio Olympics, but the 2015 world champion was permitted to compete in Brazil after it was determined he inadvertently ingested the banned substance.

The Sport Dispute Resolution Centre of Canada rendered its decision on Aug. 11, four days before Barber competed in Rio, but the report wasn't released until Thursday.

"I'm very happy with the process that we went to," Barber told a conference call. "It was quite an ordeal going into the Olympics, but everything worked out the way it was supposed to."

While the Canadian Centre for Ethics in Sport proposed a four-year ban from competition, Barber wasn't suspended but was stripped of his 2016 national title.

"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.

According to the dispute centre's report, Barber ingested the cocaine on July 8, the night before he won the Canadian title in Edmonton. The report said he had posted in the "casual encounter" section of Craigslist for a "professional person" to engage in a sexual rendezvous as a way to relieve stress. He specified in the post he wanted a woman who was drug-free and disease-free, the report said.

The woman, referred to as "W" in the report, testified that she consumed cocaine before she met Barber and then again in the bathroom of his hotel room. She said at his hearing that he could not have known she'd used the drug, and that she felt "horrible about what happened," and would hate to be the reason for Barber not achieving his dream.

Shawnacy Barber on the third day of the 2016 Canadian Track & Field Championship, on July 6. (Photo: Artur Widak/NurPhoto via Getty Images)

The woman, a mother of two, also said she'd consumed a 26-ounce bottle of vodka that evening, and had four or five drinks before meeting Barber. She offered him a drink, she said, which he declined. According to the report, there was no money exchanged between the two.

The court ruled that Barber, who called the positive test "a complete shock," had unknowingly ingested the drug through kissing.

Arbitrator Ross Dumoulin, however, wrote in his decision that "Counsel emphasized that Mr. Barber chose a random woman he had no history with, knew very little about and had barely met in person for five minutes before kissing. This was a pre-meditated effort by the athlete to have a sexual encounter with a stranger in a hotel room. Exercising utmost caution would require him to have made inquiries to satisfy himself that there was no cocaine involved."

Disappointing finish at Rio

Barber was a strong hope for a medal at the Rio Olympics after winning the 2015 world title in Beijing. But he struggled in the rainy conditions in Rio and finished 10th.

It's been a tough year for the vaulter, whose dad George was banned by Athletics Canada last fall. George Barber had acted as Shawn's coach until Canada's governing body for the sport learned of his 2007 criminal conviction on charges of having sex with a student while employed at a U.S. high school.