VANCOUVER -- British Columbia is not trying to stop the Trans Mountain pipeline expansion, but it is attempting to prevent environmental damage and hold the corporation responsible for the cleanup of a spill, a lawyer argued Monday.

The province's Court of Appeal is considering a reference case filed by B.C. that asks if it has jurisdiction to regulate the transport of oil through its territory and restrict bitumen shipments from Alberta.

Joseph Arvay, who represents B.C., said the province has no "axe to grind" against pipelines and proposed amendments to its Environmental Management Act are not aimed at blocking the project.

"The purpose was never to prevent the construction or operation of the pipeline. The purpose and effect was always to protect the environment," he told a panel of five judges.

The case asks the court to rule on the constitutional validity of the proposed amendments, which would require companies transporting hazardous substances through B.C. to obtain provincial permits.

The proposed permitting regime would order companies to provide disaster response plans and agree to compensate the province, municipalities and First Nations for any damages. If companies fail to comply with requirements, the province could suspend or cancel the permit.

A five-day hearing began Monday and the Canadian government has not yet had an opportunity to present its arguments. It says in court documents that the proposed regime must be struck down because it gives B.C. a "veto" over inter-provincial projects.

Both Prime Minister Justin Trudeau and Alberta Premier Rachel Notley have said Ottawa -- not the provinces -- has the authority to regulate trans-boundary pipelines.

Alberta, Saskatchewan, Trans Mountain Corp. and the Canadian Railway Association are among 13 parties that have filed documents in support of the federal government in the case.

Arvay acknowledged that B.C. Premier John Horgan said on the campaign trail in 2017, when his party was in opposition, that he would use "every tool in the toolbox" to stop the Trans Mountain expansion.

However, after Horgan's government took power, it received legal advice that it was constitutionally unable to stop the project but it could bring in environmental legislation, Arvay said.

Under questioning from the Appeal Court judges, Arvay acknowledged that the proposed permitting system could lead to a situation where the Trans Mountain pipeline would not be allowed to operate.

"But that's really in the hands of the pipeline," he said, adding the corporation would be responsible for ensuring it meets the permit conditions.

"That's as it should be. The Constitution shouldn't provide the inter-provincial undertaking ... an immunity from such lawful regulation."

Justice Harvey Groberman challenged Arvay's assertion that B.C. must be able to enact laws to protect its environment from trans-boundary projects in case the federal government fails to do so.

If the federal government didn't regulate airplanes, for example, that could result in a disaster in the province's airspace, Groberman noted.

"But that doesn't mean B.C. has power," he said. "We assume the federal government is acting in the public interest. ... That's just the nature of divided jurisdiction."

Arvay outlined a number of cases that he said have established legal precedent for B.C. to impose environmental laws on trans-boundary projects.

One such case was in 1899, when a court held that provinces and municipalities could require the Canadian Pacific Railway to keep ditches alongside its tracks clear of dirt and rubbish to prevent damage to adjacent properties, he said.

However, Justice Lauri Ann Fenlon said the ruling didn't necessarily prevent the railway from operating if it failed to keep the ditches clear -- unlike B.C.'s proposed legislation.

The federal government has purchased the Trans Mountain pipeline for $4.5 billion. The expansion would triple the capacity of the line from the Edmonton area to Burnaby, B.C., and increase tanker traffic in Burrard Inlet seven-fold.

Arvay said a spill of diluted bitumen in B.C. would be disastrous. The National Energy Board heard differing opinions about the likelihood of a spill, but B.C. has the right to take precautions, he said.

"We know that things don't go according to plan. Accidents happen," Arvay said.

The energy board recently ruled the project is in the Canadian public interest despite adverse effects to endangered southern resident killer whales and related Indigenous culture.

Arvay said the board has concluded that the benefits of the project are national and regional in scope, but that some local communities would shoulder the burdens of the expansion.

B.C.'s opponents in the case are essentially saying provinces are powerless to hold companies accountable and reduce the risks of catastrophic harm from inter-provincial projects, he argued.

"We say that the province is not required to accept such a fate, and that the province can be proactive in doing what it can to protect the environment."