In a 7-0 decision, justices of the Supreme Court of Canada said the province's 2010 decision to outlaw the practice was consistent with its efforts to ensure transparent drug pricing — a decision that could influence other provinces.
The ruling will allow Ontarians access to the medication they need at the lowest possible price, said the governing Liberals.
"We're very pleased that our program and our initiative has been supported, because there's no reason that people in Ontario should pay more for the same drugs than people in other parts of the country," Premier Kathleen Wynne said during a visit to Leamington, Ont.
Shoppers Drug Mart (TSX:SC) issued a short statement, saying while it respects the decision, "it is disappointed with the outcome."
Ontario's law also eliminated so-called "professional allowances" that generic drug companies paid to pharmacies in exchange for stocking their products.
The cash-strapped Liberals wanted to reduce generic drug prices to 25 per cent of the price of patented drugs — down from a previous 50 per cent — and said cutting those professional allowances was the way to do it.
Shoppers and Rexall, two of the country's largest pharmaceutical chains, challenged the province because they wanted to be able to sell their own generic versions of big-name drugs.
Private label, or store brand generic drugs, are identical in formula to other generic and name-brand drugs that are made and sold by big pharmaceutical companies.
Essentially, the pharmacy chains wanted to get into the drug manufacturing market. They argued that private labelling allowed them to cut costs by using their own version of the drugs rather than those bought from a manufacturer.
But experts have said it's unlikely they'd pass the savings on to customers and instead would use the extra revenue to recover profits that were lost when the allowances were banned.
Health Minister Deb Matthews said the changes "have delivered better value for our precious health-care dollars and are saving Ontarians $500 million a year."
"We continue to re-invest these savings to give our patients greater access to new drugs ... Today's decision upholds this progress and is a victory for Ontarians," she said in a statement.
In 2011, a lower court sided with Shoppers and Rexall, but the Ontario Court of Appeal overturned that ruling. Friday's Supreme Court ruling upholds the appeal court's decision.
The chains said the province was overstepping its boundaries, but the Supreme Court said the regulations were consistent with the province's statutory efforts to reduce drug costs.
"If pharmacies were permitted to create their own affiliated manufacturers whom they controlled, they would be directly involved in setting the formulary prices and have strong incentives to keep these prices high," Justice Rosalie Abella wrote for the majority.
"Rather than receiving a rebate financed by inflated drug prices, the pharmacy would share in the manufacturers' profits from those prices. This was expected to keep the price of drugs to consumers high."
She said the province's regulations are not overreaching.
"The private label regulations do not prohibit manufacturers from selling generic drugs in Ontario's markets; they restrict market access only if a particular corporate structure is used."
"That cannot be characterized as a total or near-total ban on selling generic drugs in Ontario."
Ontario is the only province to outlaw such private label prescription drug sales, but that may change with the Supreme Court's ruling as other provinces struggle to maintain or lower health-care costs as the population ages.
Also on HuffPost