The province is facing off with the federal government in British Columbia's highest court over whether it can regulate and even restrict the flow of oil within its borders.

In hearings broadcast online, the province's lawyer Joseph Arvay said B.C. knows it cannot stop the Trans Mountain pipeline expansion project, but said "this reference is designed to determine if it can enact environmental laws that can, to the extent possible, prevent oil spills and leaks and mitigate the harm when they occur."

Speaking at an event in Crofton, Premier John Horgan told CTV the province doesn't believe the twinning of the pipeline and the subsequent seven-fold increase in tanker traffic would be in the best interest of the economy.

"I'm confident that our case will be successful, but we'll have to wait and see what the judgement is down the road," he said.

The federal government bought the pipeline from Kinder Morgan for $4.5 billion last August -- the same month the Federal Court of Appeal overturned Ottawa's approval of the project, citing a need for more consultation with First Nations and a review of the impacts of tanker traffic.

The National Energy Board recently recommended the project be approved again with additional conditions, despite potential risks to endangered southern resident killer whales.

"Canada's position is that federal jurisdiction in this matter is clear," a spokesperson for Natural Resources Canada said in a statement.

"On TMX, we will continue following the guidance from the Federal Court of Appeal to move forward in the right way, through meaningful consultations."

Alberta is siding with Ottawa in the Court of Appeal case.

In an emailed statement, a spokesperson for the energy ministry told CTV they believe B.C.'s proposed legislation is an attempt to stop the project, rather than a bid for increased environmental protection.

"Our government stood up to B.C.'s obstruction from the beginning and will continue to," said ministry spokesperson Mike McKinnon.

Alberta's Premier Rachel Notley has said her province is prepared to cut oil exports to B.C. if the project continues to hit roadblocks.

In May 2018, she told media that "B.C. does not have this authority. The constitution is clear."

Environmental law charity Ecojustice Canada will also be speaking at the hearings, which are scheduled to last five days.

"We've entered into a constitutional debate about which level of government should be able to protect the environment," Ecojustice lawyer Kegan Pepper-Smith said. "It's not about prohibiting the project outright, it's about ensuring as much environmental protection as possible."

The court's decision will be reserved until a later date. No matter what the court decides, it's expected this case could end up before the Supreme Court of Canada.