OTTAWA, Ontario (AP) — Star Canadian pole vaulter Shawn Barber tested positive for cocaine before the Rio Olympics following a tryst with a woman he met on Craigslist.

The 2015 world champion was permitted to compete in Brazil after it was determined he inadvertently ingested trace amounts of the banned substance through kissing. Barber called the positive test "a complete shock."

The Sport Dispute Resolution Centre of Canada made its decision Aug. 11, four days before Barber competed in Rio de Janeiro, where he finished 10th. The report wasn't released until Thursday.

"It was quite an ordeal going into the Olympics, but everything worked out the way it was supposed to," Barber said during a conference call.

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

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

According to the report, Barber used cocaine July 8, the night before he won the Canadian title in Edmonton, Alberta. 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 he wanted a woman who was drug- 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 he could not have known she'd used the drug, and she felt "horrible about what happened."

The woman also said she had consumed a 26-ounce bottle of vodka that night and had four or five drinks before meeting Barber. She said he declined her offer of a drink. The two did not exchange money, the report said.

Arbitrator Ross Dumoulin wrote in his decision that the encounter was a "pre-meditated effort" by Barber to have a sex 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," he added.

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.

Last fall, Barber's father, George, was banned by Athletics Canada. George Barber had acted as Shawn's coach until the governing body learned of his 2007 criminal conviction on charges of having sex with a student while employed at a U.S. high school.