CALGARY -- A lawyer for the British Columbia government has argued Alberta's turn-off-the-taps law is a weapon that should be defused until a court decides whether it's constitutional.

"There's a loaded gun," B.C senior counsel Gareth Morley told a Calgary courtroom Friday.

"We need to make sure that it doesn't accidentally go off."

The legislation was passed -- but never used -- by Alberta's former NDP government as a way to put pressure on B.C. to drop its fight against the Trans Mountain oil pipeline expansion to the West Coast. The law gives Alberta the power to crimp energy exports.

The new United Conservative government proclaimed it into force shortly after Premier Jason Kenney was sworn into office in April, but he has said it won't be used unless B.C. throws up further roadblocks to the pipeline.

B.C. filed a statement of claim in Alberta Court of Queen's Bench last month calling the law unconstitutional and has made a similar filing in Federal Court.

It notes 55 per cent of its gasoline and 71 per cent of its diesel comes from Alberta refineries, and that the Parkland refinery in Burnaby, B.C., produces a quarter of B.C.'s fuel using mostly Alberta crude.

On Friday, B.C. argued for an injunction that would stop the Alberta government from using the law against B.C., or require Alberta Energy Minister Sonya Savage to get court approval before doing so.

Queen's Bench Justice Robert Hall reserved his decision on the injunction, and whether B.C. has standing to request it in his court.

At the heart of Friday's arguments was debate over whether the law harms B.C.

Morley contends that it does, even though there's been no suggestion that an order to turn off the taps is in the offing. He noted there's no obstacle to Savage issuing such an order, other than her government's professed preference not to for the time-being.

Evan Dixon, a lawyer representing the Alberta government, suggested Morley was asking Hall to "speculate on a worst-case scenario."

"The attorney general of British Columbia has failed to produce any credible evidence that the act is being used in the manner suggested."

He said the legislation itself uses moderate, benign language and makes no specific mention of it being aimed at B.C.

The judge interrupted Dixon frequently to challenge him on that point. Hall said it's clear from Kenney's comments in the legislature that the law is meant to squeeze Alberta's western neighbour.

"It's to lay some hurt on B.C. and so the government of B.C. says, 'I'm going to stand up for my people,"' Hall said.

Dixon also argued that B.C.'s attorney general does not have standing to fight the law in Alberta's Court of Queen's Bench because there are parties that would be more directly affected, like industry players or the federal government.

But Morley said it's the attorney general's job to stick up for the public interest.

"We're here because British Columbia's vital interests are at stake."

The Trans Mountain expansion, first approved in 2016, would triple the amount of oil flowing from the oilsands to B.C.'s Lower Mainland and from there to lucrative new markets across the Pacific.

The federal government bought the existing pipeline last year for $4.5 billion after its original builder, Texas-based Kinder Morgan, threatened to walk away from the project because of B.C.'s resistance.

The Federal Court of Appeal quashed the approval months later on the grounds that there hadn't been enough consultation with First Nations or consideration of the pipeline's potential impact on marine wildlife.

The project was approved for a second time by the federal cabinet last week.