British Columbia’s privacy commissioner says a ruling by Canada’s top court barring access to personal health records is a reflection of greater awareness about how such information could be wrongly used.

Michael McEvoy said even providing a tobacco company with data that excludes names and health numbers would have been problematic because the use of various databases could easily identify individuals.

Philip Morris International wanted patients’ records in a bid to fight British Columbia’s efforts to recover smoking-related health-care costs but the Supreme Court of Canada issued a ruling Friday saying the province doesn’t have to provide the documents.

McEvoy said the information the company requested shouldn’t be in the hands of anyone outside of the health-care system.

The precedent-setting decision will provide greater privacy protection in the province and have wider implications for all Canadians, he said.

McEvoy said recent privacy issues surrounding British political consulting firm Cambridge Analytica, which mined Facebook users’ information, have drawn the attention of citizens around the world about what can go wrong when sensitive data is used for unintended purposes.

British Columbia introduced legislation in 2000 to protect citizens’ privacy as it worked to recoup health-care costs related to tobacco use.

“That’s the reason we intervened in the case to support the province’s position,” McEvoy said of his office’s involvement about two years ago, when Philip Morris asked for patients’ information despite decades of mounting evidence about addictive nicotine links to cancer from smoking.

“It’s a precedent-setting case that will provide greater privacy protection for sensitive health information of citizens in this province and hopefully have wider applications for all Canadians,” he said.

The top court’s unanimous decision came 17 years after B.C. launched legal action against the tobacco industry, and it’s been followed by similar cases by every other province.

Last year, the B.C. Court of Appeal upheld a lower court’s decision requiring the government to hand over the patient data.

The Health Ministry said in a statement that holding tobacco companies accountable is a priority for the province.

“The security and confidentiality of health data was one of our primary considerations in pursuing this appeal.”