VICTORIA -- In a blow to the NDP government and environmental activists, the highest court in the country has dismissed the province's attempt to regulate heavy oil flowing through B.C.

"We are all of the view to dismiss the appeal for the unanimous reasons for British Columbia," said Chief Justice Richard Wagner in delivering the decision.

Premier John Horgan was not available for an interview, but in a statement he said, "Clearly, we are disappointed by the decision, but this does not reduce our concerns regarding the potential of a catastrophic oil spill on our coast."

The premier went on to say the province would continue to protect the coast, although the statement didn’t lay out exactly how.

For many, including the opposition, this is seen as an embarrassing loss for the Horgan government.

"John Horgan knew the federal government held clear jurisdiction over the pipeline but he spent millions of dollars just in political posturing," said BC Liberal leader Andrew Wilkinson in a news release.

Horgan had championed the Supreme Court of Canada reference case. The goal was to ask whether or not provinces had the right to restrict what kind of fuel flows through them. It came after the province sought input on proposed guidelines. Alberta was so put off by just the mere suggestion, it retaliated with a ban on B.C. wine and then threatened to turn off the taps and limit how much gas gets to B.C.

Pipeline approvals are under federal jurisdiction, so many, including those in Alberta, saw this as another attempt to stop the controversial Trans Mountain pipeline project.

In the midst of the row, the federal government purchased the pipeline. Horgan remained committed to going to the SCC.

The Liberals, through freedom of information requests, are estimating the case alone cost taxpayers nearly $1 million.