A Saskatchewan judge has ruled police acted within the law when they sent a cellphone seized in a drug investigation away for forensic analysis without a warrant.

In July 2013, a 911 caller reported seeing hand-to-hand exchanges between people sitting in vehicles outside a school in Nipawin.

RCMP responded and pulled over a car that was leaving the school parking lot after officers saw a few people standing and “milling” around the vehicle.

Police found two teenaged boys in the car and detected the smell of fresh marijuana. Officers also noticed a marijuana grinder, pipe and plastic baggies were in plain view inside the vehicle.

A search of the car turned up eight individually-rolled tinfoil balls, each containing about a gram of marijuana, along with more pot pipes and grinders.

During the search, one of the officers found a cellphone belonging to one of the teens, which was powered on and was not protected by a password.

The officer viewed two recent text message conversations. In one conversation, an individual asked the phone’s owner if they could buy a “30,” and in the other exchange a different person asked to buy a “40.”

The officer interpreted those messages as an arrangement to buy marijuana, and the two teens were arrested and charged with drug trafficking.

Lawyers for the two accused argued that police violated their Charter right against unreasonable search and seizure when they took the teen’s cellphone and went through it.

However, provincial court Judge James Rybchuk ruled the limited, cursory search of the cellphone at the scene was incidental to the arrest and lawful. As such, the text messages are admissible as evidence at trial.

The investigating officer later sent the cellphone to the Saskatchewan Technological Crime Unit in Saskatoon for a forensic analysis of its contents without first obtaining a search warrant.

In December 2014, a divided Supreme Court of Canada ruled that police can conduct limited warrantless searches of a suspect’s cellphone.

But the court also said “the search of the entire contents of a cellphone or a download of its contents is not permitted as a search incident to arrest."

Rybchuk agreed, and found that the warrantless forensic analysis of the cellphone violated the constitutional rights of its owner.

However, the judge also concluded that the officer was acting in good faith because he didn’t think he needed to get a warrant to send the phone away for analysis.

The judge ruled the evidence obtained through the analysis was admissible because the law was unclear at the time of the search.

“Drug trafficking is a serious crime and society’s interest would be best served by having the evidence from the cellphone admitted,” Rybchuk wrote in his decision, which was recently published online.

“The exclusion of this evidence would undermine the truth seeking function of the justice system.”