The B.C. Court of Appeal has ruled against a proposed piece of legislation that would restrict diluted-bitumen shipments in that province, a decision that could have impacted the Trans Mountain expansion project.

When the law was introduced, the B.C. government went to the Court of Appeal to determine if creating a permitting system for companies wanting to increase the flow of crude through the province was constitutional.

B.C. says it’s a move that would protect land, rivers and lakes from hazardous materials, but Alberta and the federal government says it’s only a tactic to delay or even kill Trans Mountain.

in the end, the appeal court agreed with opponents to the legislation, saying it went "beyond provincial jurisdiction" when B.C. attempted to force companies to obtain a permit if they wanted to increase the flow of crude through the province's borders.

Premier Jason Kenney, in a statement released on Friday, said he hopes that the B.C. government will give up its fight and "end its campaign of destruction."

"The TMX pipeline would be a win-win for both B.C. and Alberta. It will allow Alberta to realize a fair price for our natural resources and create new jobs, and it could provide much-needed relief at the pump for British Columbians. That is why this court decision is an occasion for real hope for the hard-working people of both provinces."

Policy analysts in Alberta call the decision a huge victory not just for the province, but for the entire country.

"I think it's a win for all of Canada because what we really need in Canada is the ability to move our products to market," said Richard Masson with the University of Calgary. "Getting this court decision in place helps ensure that there is a better chance that the pipeline's going to get built."

He says big projects like Trans Mountain often get tied up in the courts and this decision emphasizes the federal government's regulatory process.

"The B.C. court essentially said, 'The federal process should be followed.'"

Masson says three projects, Enbridge's Line 3, Keystone XL and Trans Mountain, all need to be built to help the oil industry thrive.

The Trudeau government purchased the pipeline and expansion project for $4.5 billion and Alberta sees it as an essential development to revitalize its sagging energy sector.

Saskatchewan, Trans Mountain Corp. and Enbridge Inc. also argued in court against B.C.'s proposed permit regime, while First Nations, cities and environmental groups supported it

There is no word on whether or not the decision will be moved ahead to the Supreme Court.

(With files from CTV's Melanie Nagy and the Canadian Press)