The B.C. government's legal action against Alberta legislation that could allow the province to restrict oil and gas shipments to that province has been struck down.

A Calgary justice says the B.C. government should have waited until the law was in force to file the constitutional challenge, saying the claim was both "premature and inappropriate for consideration by the court."

B.C. filed the statement of claim in Alberta's Court of Queen's Bench in May 2018, challenging the constitutionality of Alberta's Preserving Canada's Economic Prosperity Act.

The act, also known as Bill 12, gained royal assent on May 18, 2018, but has not yet come into force on proclamation.

It requires exporters to obtain licenses, and gives Alberta's energy minister the power to decide how much fuel is exported, how it's transported — by pipeline, rail or tanker truck — and whether direct shipments to be stopped altogether.

"The Government of Alberta introduced and supported the Act because it asserts British Columbia is responsible for "delays" to an expansion of the Trans Mountain Pipeline … Alberta seeks to utilize powers under the Act to punish British Columbia, and to exert pressure upon British Columbia," B.C.'s statement of claim reads.

B.C. said a significant percentage of the fuel it consumes comes from Alberta. It adds any disruption could cause irreparable harm, both to the economy and to health and safety in remote communities that depend on a reliable fuel supply.

B.C. could resubmit once bill is proclaimed

But Calgary Justice R.J. Hall, in a decision dated Friday, said the claim of B.C.'s attorney general was made too early as the bill hasn't actually been proclaimed yet.

"Should the Alberta government proclaim the act in force, the [Attorney General of B.C.] may recommence a claim," Hall wrote.

Alberta Energy Minister Marg McCuaig-Boyd said the government is pleased the challenge was struck down.

"This law remains available if necessary. In the meantime, we're encouraged by Friday's NEB decision and are taking decisive action to move more oil by rail until new pipelines are built … we call on the Government of BC to recognize our shared interest in moving our natural resources to new markets as we support their efforts to export LNG," she said.

The bill is just one of the province's weapons in its political battle over the Trans Mountain pipeline expansion, which Alberta's NDP-led government has accused B.C.'s NDP-led government of blocking.

"Albertans, British Columbians and all Canadians should understand that if the path forward for the pipeline through B.C. is not settled soon, I am ready and prepared to turn off the taps," Alberta Premier Rachel Notley said when the bill passed last May.

On Friday, the National Energy Board reiterated its approval of the $7.4-billion pipeline with new recommendations to protect the environment in B.C.

B.C. Environment Minister George Heyman took to Twitter to reiterate B.C.'s concerns with the project.

This project is not in the best interests of the tens of thousands of people who depend on our coast for their livelihoods.<br><br>We're going to continue to assert our right to defend BC's env't in court & will continue to insist the federal gov't take BC's concerns seriously. —@GeorgeHeyman

Alberta Premier Rachel Notley said she's "cautiously optimistic" there will be shovels in the ground this fall on the project.

As for Bill 12, Alberta's government has not yet said when it will be proclaimed into law or provided details of how it will be implemented.