The Supreme Court of Canada says a London, Ont., teacher who secretly filmed female students' chests with a camera pen is guilty of voyeurism — a ruling that could have an impact on future privacy-related cases.

​At issue in the case was whether the students — youths aged 14 to 18 — had a reasonable expectation of privacy when they were being secretly recorded by Ryan Jarvis on school property.

In a unanimous decision Thursday morning, the top court said students doing everyday activities at school don't give up their privacy rights — even if the school maintains security cameras.

The case marks the first time the top court has had to dive into the implications of voyeurism, a Criminal Code charge introduced back in 2005. It covers the act of secretly watching or recording for a sexual purpose someone who has a reasonable expectation of privacy.

Writing for the majority of the bench, Chief Justice Richard Wagner said privacy is the "concept of freedom from unwanted scrutiny, intrusion or attention."

"The explicit focus of the videos on the bodies of the students recorded, including their breasts, leaves me in no doubt that the videos were made in violation of the students' reasonable expectations of privacy," he wrote.

The case dates back to late 2010, when Jarvis was caught secretly filming students' faces, chests and cleavage areas.

The videos, which range from six seconds in length to just over two-and-a-half minutes, often involved Jarvis talking to the students in classrooms and the school's hallway.

In 2015 the trial judge determined that Jarvis had violated the students' privacy by using a so-called spy pen. But Justice Andrew Goodman wasn't satisfied the videos were filmed for a sexual purpose and acquitted Jarvis.

The Ontario Court of Appeal went another way. Most of the judges on that bench ruled that Jarvis did act with sexual intent, but still upheld his acquittal, arguing the students had no reasonable expectation of privacy at school.

That court pointed to the presence of 24-hour surveillance security cameras in and around the school, "which were clearly visible to everyone."

However, one of the appeal court judges dissented, triggering the Supreme Court hearing.

While all nine justices agreed Jarvis should be found guilty, they came at that conclusion from two different directions.

Writing for the majority, Wagner stressed that privacy is "not an all-or-nothing-concept" and "being in a public or semi-public space does not automatically negate all expectations of privacy with respect to observation or recording."

"The use of a cell phone to capture upskirt images of women on public transit, the use of a drone to take high-resolution photographs of unsuspecting sunbathers at a public swimming pool, and the surreptitious video recording of a woman breastfeeding in a quiet corner of a coffee shop would all raise similar privacy concerns," he wrote.

In a concurring decision, Supreme Court Justice Malcolm Rowe expressed some concerns but ultimately agreed with the court's conclusion.

Rowe argued that using the Charter to interpret Parliament's intention when it introduced the voyeurism charge "would put the judiciary in the position of creating new common law offences."

"Courts should not expand criminal liability by reference to Charter jurisprudence," he wrote.

"With respect, I would not adopt such a multi-factored test to decide whether there is a reasonable expectation of privacy in the context of the voyeurism offence."

The 'right' result

The decision is getting applause from privacy watchdogs and women's rights groups.

A spokesperson for the federal privacy commissioner said the case could have a wider impact on scenarios involving public surveillance.

"We were pleased to see the court reaffirm that privacy must be evaluated in light of changing technologies, which can make it easier for the state and private entities to 'glean, store and disseminate information' about individuals, and that privacy should not correspondingly shrink as a result," wrote Tobi Cohen in an email to CBC News.

"More generally, the court was sensitive to the important privacy interests at play – young people's bodies and their reasonable expectation to be free from being recorded for a sexual purpose by someone in a position of trust."

Gillian Hnatiw gives a statement during the Jian Ghomeshi trial back in February 2016. Hnatiw said the Supreme Court's ruling today sets clearer guidelines around what a reasonable expectation of privacy means when dealing with voyeurism. (David Donelly/CBC)

Lawyer Gillian Hnatiw, vice-chair of the Women's Legal Education and Action Fund board — an intervener in the case — said the decision should lay out a "very thoughtful test" for determining what a 'reasonable expectation of privacy' means in the context of a sexual crime.

"It has intentionally extended protections to women in all sorts of public and quasi-public spaces," she said.

"Going forward, each case will turn on its facts, as cases always do. But this gives trial courts across the country scope to recognize that this is about more than just privacy, that it's also about sexual integrity."

Jarvis's lawyers call it 'troubling'

Ontario's Information and Privacy Commissioner Brian Beamish, who also acted as an intervener, called it the "right result."

"I think primarily they recognize that the question of whether someone's privacy interests have been violated is not simply a matter of asking whether they were in a public place or not, that context really does matter," he said.

"I like the fact that the court also recognized the importance of the integrity of the person. The court used examples that underline ... that people have the right to feel that their bodies are not being targeted, whether that's at a school or on a bus or on the subway ... I think that's a really important principle."

Jarvis's lawyers released a statement Thursday calling the majority's decision "a troubling judgment."

"The criminal law has traditionally been guided by a sense of fairness that prioritizes certainty, restraint and fair notice. The majority's approach is, arguably, a profound departure from these values," wrote Zachary Kerbel and Saman Wickramasinghe.

The lawyers said they worry the Supreme Court's "expansive" definition of what constitutes a reasonable expectation of privacy casts "the net of criminal liability too wide."

"The majority's decision risks eroding this distinction and capturing conduct which, while offensive, ought not to attract the personal ruin, stigma and deprivation of liberty that accompanies a conviction for a criminal offence," they said.