EDMONTON -- British Columbia's premier fought battles over the Trans Mountain pipeline on two fronts Wednesday, going to court against Alberta's premier, who wants the line expanded, while urging Ottawa to start shipping more gasoline through the pipe that's already there.

John Horgan, speaking to reporters in Victoria, announced his government has filed court documents challenging the legality of an Alberta law that gives that province the power to squeeze B.C. over oil and gas shipments.

The law was proclaimed a day earlier by Alberta Premier Jason Kenney on his first day in office.

Horgan said he spoke with Kenney by phone after the law was proclaimed. He said while it's "regrettable" the bill was activated, he respects Kenney's stand and thinks the two can work together to find common ground on the root cause of the dispute -- the Trans Mountain pipeline expansion.

"The conversation was quite cordial. We had some good laughs. He's got a sense of humour. That puts us in a good spot right off the bat," said Horgan.

"He worked very hard to ascend to the position he's now and I don't believe he did so just to be combative."

The law at the centre of the fight gives Alberta a say in how much gasoline, jet fuel, diesel and other oil products exporters can ship out of the province.

It is legislation passed by former NDP premier Rachel Notley a year ago and held in reserve as Alberta battled B.C.'s opposition to the Trans Mountain expansion, a project that would triple the capacity of the existing pipeline in order for Alberta to export more oil abroad.

When Alberta passed the law a year ago, B.C. challenged it in court. But that case was tossed out because the law had yet to be proclaimed.

The latest legal challenge is to be heard Tuesday, said B.C. Attorney General David Eby.

The province will argue the Alberta law is unconstitutional because provinces can't discriminate in the distribution of natural resource products, Eby said.

Kenney told reporters while he doesn't plan to use the law right away, he needed to send a message.

"We did this to have the power to protect Alberta, to protect our ability to get full value for our resources," he said.

Horgan said Wednesday that Trans Mountain has become a real and expensive issue in B.C. as motorists pony up around $1.70 a litre for gas in the Lower Mainland.

He said the existing Trans Mountain line, which is owned by the federal government, is sending higher amounts of raw bitumen and less refined products such as gasoline to the West Coast to be used by B.C. residents.

"The consequence of that is prices are going up," said Horgan.

"I will say directly to the prime minister, but I said to his people today: 'You own the pipeline. Get some gasoline into that pipeline so that we can relieve pressure in the Lower Mainland."'

When asked by reporters if he would bargain with the federal government, perhaps swapping B.C. approval for the Trans Mountain expansion for more gasoline coming down the existing pipeline, Horgan said he wouldn't negotiate in public.

But he added: "We're going to sit down with people and work out what's in the best interests of all parties."

B.C.'s gas price spike adds a few more tangled strands to what has become a knot of competing political and economic interests over Trans Mountain.

While Horgan said B.C. wants the federal government to put more gasoline in the existing Trans Mountain line, he also said they can't countenance agreeing to a project that risks an oil spill from a loaded tanker in the heavily populated Burrard Inlet.

Ottawa wants to get more oil to market to help the national economy, but has pledged to do so in an environmentally sustainable way, which includes a carbon tax.

Kenney, however, won the recent Alberta election on a centrepiece promise to kill an existing provincial carbon tax and fight Trudeau's carbon tax in court.

Kenney also campaigned on labelling Trudeau an arch foe to Alberta's oil patch and has promised to do everything in his power to get him defeated in the fall federal election.

"There is an opportunity for the three governments to find a way forward," said Horgan. "But there is a lot of work to do."