The Supreme Court of Canada has ruled that sexually explicit online messages exchanged with a minor are not private and can be used in undercover police operations without a warrant.

In a unanimous 7-0 decision, the justices upheld Sean Mills' conviction for child luring. Justices were divided on their reasons, but a majority ruled that police do not need judicial authorization to intercept communications for investigations involving child predators.

The majority said Mills did not have a reasonable expectation of privacy.

Mills was found guilty of one count of child luring in 2014 after an undercover operation by the Royal Newfoundland Constabulary. Investigators had set up fake Facebook and Hotmail accounts, posing as two teenage girls.

Mills engaged in sexually explicit exchanges with the 14-year-old persona "Leann" and eventually arranged a meeting in a local park.

Police officers used a screenshot program to capture and record copies of the email communications; they did not obtain judicial authorization to intercept communications. Mills' home was searched after his arrest under warrant, and two computers were seized.

He took his case all the way to the top court, arguing his constitutional right to privacy was violated and that police did not obtain a court order for intercepting private online exchanges.

Justice Russell Brown reasoned that Mills had no reasonable expectation of privacy.

"He was communicating with someone he believed to be a child, who was a stranger to him, and the undercover officer knew this when he created her," Brown wrote in his judgment.

Police stings 'essential' to child protection

The Canadian Centre for Child Protection welcomed the court ruling, calling undercover police work "essential" to proactively protecting children online.

The organization's general counsel, Monique St. Germain, said Statistics Canada reported more than 1,300 incidents of child luring last year.

"This number only includes the incidents that came to the attention of police and demonstrates that this is major child protection issue," she said in a statement to CBC News. "It is of fundamental importance that individuals not be able to claim a 'reasonable expectation of privacy' to shield their communications and allow them to act with impunity as they actively target those who need our protection most – our children."

Mills' St. John's-based defence lawyer Rosellen Sullivan argued police should have obtained a warrant once it became clear that ages had been established and her client was considered a suspect in the ongoing investigation.

Police should have rules, says lawyer

Sullivan said it's important to have rules on when police can and can't obtain communications without a court order.

"I'm not saying, 'Oh, let's protect internet predators,'" she said. "I'm saying this protection has to be available to everyone."

Crown prosecutor Lloyd Strickland said undercover operations are responsible for a high percentage of arrests and prevent harm to children.

"For police being able to go online ... and conduct these operations online, it is hoped, and I think it is reasonable to assume, that they are sparing younger boys and girls from having to deal with it," he said.

"Because if the police don't do it, what are the other options? You rely on a child to tell somebody?"

Don't 'hamstring' police, chiefs warn

Mills has already served his yearlong sentence, but took the case to the high court in the hope that a favourable ruling could clear his name from the sex offender registry.

Nine other parties intervened in the case, including several provincial attorneys general.

Justice Sheilah Martin agreed with the trial judge's conclusion that Mills' privacy rights were breached and that the seizure was "unreasonable."

"It was objectively reasonable for M to expect that a permanent recording of the communications between himself and the police officer would not be surreptitiously acquired by an agent of the state absent prior judicial authorization," she said.

But Martin also concurred with the trial judge's conclusion that while there was a breach, finding Mills not guilty would bring the "administration of justice into disrepute." The trial judge shaved two months off the sentence to compensate for the breach.

The Canadian Association of Chiefs of Police had argued that the Criminal Code offence of internet luring is an "insidious crime," which can harm children through communications, even if the adult never meets with the victim.

In its written submission to the court, the association warned that a court ruling requiring a warrant for undercover techniques would "hamstring" police trying to enforce the law.

"It (would) allow online predators to victimize children without fear of police detection. The onus would then be placed on the child or parent to report the crime, which runs counter to Parliament's intention when enacting this legislation," the submission reads, adding that any court order requirement could delay a predator's arrest and put other children at risk.

The Canadian Civil Liberties Association had urged the court to uphold Canadians' privacy rights, arguing the reasonable expectation of privacy does not change because one of the participants in the conversation is an "agent of the state."

"These investigative techniques may be reasonable if they have prior judicial authorization or if Parliament creates police powers specifically enabling them," says the association's written submission.

"But the fact that the police seek to use these investigative techniques can not overwhelm the analysis of whether there is a reasonable expectation of privacy in electronic conversations."