British Columbia's attorney general says the province is prepared to go to court if Alberta's United Conservative Leader Jason Kenney tries to turn off the oil taps to its western neighbour amid a dispute over the Trans Mountain pipeline expansion.

"I hope that he'll take the approach of having conversations with the provinces that they have disagreements with rather than take any rash and, we believe, unconstitutional action," David Eby told reporters Tuesday. "If it's necessary, we'll be in the courts to defend the interests of British Columbians and we can be in court right away to do that, but we hope it's not necessary

Eby's remarks come a day after Kenney, who is vying to become Alberta's next premier, told supporters in Medicine Hat that he would bring in legislation allowing him to cut off the oil supply to B.C. if elected.

"We will make it very clear to the NDP government in Victoria that if they continue their campaign of obstruction we will be prepared to turn off the flow of Alberta energy to B.C.'s Lower Mainland."

The Alberta election will be held on Tuesday, April 16.

Plans for the Trans Mountain pipeline expansion came to a halt in late August after the Federal Court of Appeal overturned the Trudeau government's approval of the controversial project.

By that point, B.C. and Alberta had been involved in a feud over the expansion for months.

While the B.C. government moved to gain legal permission to restrict an increase in diluted bitumen to the coast, Alberta threatened to limit oil shipments and even went so far as to temporarily boycott B.C. wine – a move that could have cost B.C. wineries some $160 million a year.

The wine ban was corked in late February 2018.

The National Energy Board once again endorsed the pipeline project in February, triggering a 90-day period in which the federal government has to decide if the expansion should go ahead.

With the files from The Canadian Press