A provincial court judge has found a former RCMP inspector not guilty of sexually assaulting a civilian employee.

The former Mountie was accused after a sexual encounter in a unisex washroom at the force's headquarters in British Columbia.

Tim Shields, who was a high-profile spokesperson for the RCMP in the province, pleaded not guilty to one count of sexual assault alleged to have happened in 2009.

While giving his decision, Judge Patrick Doherty said while both versions of events were "plausible," the evidence presented by Shields raised a reasonable doubt about the alleged crime.

"I recognize the courage required by a sexual assault complainant to come forward and testify in a criminal trial, however, a criminal trial is not a credibility contest between witnesses," Doherty said, reading his judgment from the bench.

Doherty noted the "historic nature" of the eight-year-old incident and said the complainant "presented poorly" at times and was forgetful and combative as a witness.

He said he did have concerns about some of Shield's evidence about how he ended up in the washroom.

The complainant, who cannot be identified because of a publication ban, testified that Shields led her to the unisex washroom before kissing and groping her.

The Crown said Shields had a "mistaken belief" about consent when he touched the woman's breasts, unbuttoned her pants and put her hands on his genitals.

Defence lawyer David Butcher questioned the woman's credibility during the trial, saying she had exchanged at least one flirty email with his client, and the pair's working relationship had evolved into intimate hugs in his office when the woman repeatedly walked in unannounced and sometimes closed the door.

Judge said complainant "presented poorly" as a witness. Was combative at times. Says her gap in memory during incident went unexplained —@FarrahMerali

Crown attorney Michelle Booker said Shields provided an extraordinarily detailed, mechanical and unreasonable account of the incident in the washroom when he testified, saying the woman "actively and enthusiastically" participated in sexual acts and made no attempt to escape from the washroom.

The complainant told the court that Shields said he had something important to tell her before leading her down a flight of stairs and into the washroom, where he locked the door and sexually assaulted her, leaving her "frozen and confused."

Shields joined the RCMP in 1996 and was promoted to inspector in 2009.

He was suspended with pay in May 2015 in the middle of a code of conduct investigation.

He left the force in December 2015 and was charged in May 2016.