A judge has dismissed the British Columbia government’s request to declare unconstitutional an Alberta law that could restrict the flow of refined oil products to B.C.

The attorney general of B.C. alleged in a statement of claim that the Preserving Canada’s Economic Prosperity Act was meant to counteract steps taken by B.C. in its opposition to the Trans Mountain pipeline project.

B.C. had asked Alberta’s Court of Queen’s Bench to declare the law unconstitutional, but Justice R.J. Hall wrote in a decision issued Friday that since the law was never officially proclaimed, the request to strike it is premature.

The Act was passed by the Alberta legislature last May and allows limits on fuel exports to B.C.

We’ve taken another important step toward building #TransMountain pipeline.Now, the federal gov’t needs to move ahead with proper consultations with affected Indigenous communities.Together, we can do big things – like #TMX – when we do them right and in the national interest. pic.twitter.com/EsKafmJatZ

Plans to triple capacity along the existing Trans Mountain pipeline from Edmonton to Burnaby have pitted Alberta and the federal government against B.C.’s government, which says the risk of a spill is too great for the province’s environment and economy.

Hall wrote that should the Alberta Government proclaim the Act into force, B.C.’s attorney general may file again.

“Without giving my opinion here, as to the propriety of an injunction application before proclamation of a statute, I am of the view that a claim seeking a declaration as to constitutionality of an Act that has not yet been proclaimed, is premature,” Hall wrote.

“For the court to consider such a claim, the Act must first be in force.”

Hall wrote that while B.C. argued that courts consider interim injunctions against laws that have been passed but not proclaimed, he noted that B.C. didn’t ask for an injunction — only that the law be declared unconstitutional.

B.C. Attorney General David Eby argued before the challenge was launched that the Alberta law was unconstitutional because one province cannot punish another.

Alberta Premier Rachel Notley defended the law when it was passed, saying her government doesn’t want to impose hardship on B.C. businesses and families, but Alberta must also safeguard its interests.

She also said she was confident it would withstand a legal challenge.

No date has been set for proclaiming the law, although Alberta’s energy minister, Marg McCuaig-Boyd, said Saturday that it “remains available if necessary.

“We’re pleased this challenge has been struck down by the court and will keep fighting for fair value and market access for our resources,” McCuaig-Boyd said in a statement.

Hall noted in his decision that B.C. filed an affidavit from an official in the province’s Ministry of Energy Mines and Petroleum Resources, which said approximately 55 per cent of B.C.’s gasoline and 71 per cent of its diesel is imported from Alberta refineries.

He said the affidavit noted the majority of that fuel travels through the Trans Mountain pipeline, carrying an average of eight million litres per day of refined petroleum products from Alberta to B.C.

“It says that reductions in supply from Alberta will cause shortages in British Columbia and that the result could be increased prices, lack of supply and civil unrest in British Columbia,” Hall wrote, adding that lawyers for B.C.’s attorney general argued the potential effects made it important for the court to decide whether the law was legal.

“The affidavit makes interesting reading as to B.C.’s supply of gasoline and diesel fuel, and its dependence upon Alberta,” Hall added.

A spokesman for B.C.’s attorney general was asked for comment on the judge’s decision, but did not immediately have a response.

The National Energy Board on Friday gave conditional endorsement of construction of the Trans Mountain pipeline expansion, saying the project’s benefits outweigh its negative impacts on killer whales and potential environmental damage if there’s a spill.