A former Surrey RCMP officer has pleaded guilty to breach of trust nearly two years after he was targeted by an online vigilante group.

Dario Devic was arrested in September 2016, just days after Surrey Creep Catchers—whose stated goal is to expose sexual predators on social media—streamed live on Facebook an encounter with a man the group alleged was an RCMP officer who was attempting to meet a teenager for sex.

Devic's lawyer, however, denied that his client ever intended to meet a minor.

"At no point did he believe the person was underage and in fact, the person who sent out the email, which is Creep Catchers, they themselves initially stated that they were an adult and they provided pictures which completely confirmed they were an adult," Rishi Gill told CTV News Thursday.

"The position of Mr. Devic has always been that he is prepared to accept responsibility for acting inappropriately, especially while he was a police officer."

Devic was charged with attempting to lure a child under the age of 16 and breach of public trust.

The former cop pleaded guilty to the latter charge Thursday morning, and Gill said the child luring charge will be dropped after sentencing.

An internal RCMP Code of Conduct investigation into what happened was also launched.

According to RCMP Staff Sgt. Annie Linteau, Devic was discharged from the force earlier this year.

"Given he is no longer a serving member there are no other RCMP internal processes underway," Linteau said.

The sentence for this kind of offence can range from a discharge to a jail sentence, but Gill doesn't believe his client will spend any time behind bars.

Devic's sentencing hearing is scheduled for Sept. 11.

With files from CTV Vancouver's Michele Brunoro