CALGARY, Alberta--A British Columbia court ruled on Friday that the provincial government cannot introduce a law that would regulate increased flows of heavy crude through the proposed Trans Mountain pipeline.

The decision removes a potential obstacle to the Trans Mountain pipeline expansion project, which the Canadian government bought last year for to C$4.5 billion to help it get built. Justin Trudeau's Liberal government will decide by June 18 whether to push forward with the project.

The expansion, which is opposed by the provincial government of British Columbia, environmentalists and some indigenous groups, would nearly triple shipments of oil sands crude from Alberta to Canada's Pacific Coast.

British Columbia's government last year filed a reference question to the province's top court, asking if it could change the Environmental Management Act to allow British Columbia to regulate companies that want to increase the flow of diluted bitumen from the oil sands.

In a judgment published on its website, British Columbia's Court of Appeal said it was not within the authority of the provincial government to make those changes as Trans Mountain falls under federal jurisdiction.

"The amendment was targeted legislation that in pith and substance relates to the regulation of an interprovincial undertaking - the expanded interprovincial pipeline of Trans Mountain Pipeline ULC and Trans Mountain Pipeline LP which is intended to carry "heavy oil" from Alberta to tidewater," British Columbia's Court of Appeal said in its ruling.