Sometimes the universe unfolds as it should. And sometimes, when you least expect it, the wheels fall off.

The wheels fell off for Justin Trudeau this week. Just when he thought this pipeline mess had finally been resolved, along came Andrew Weaver to mess it up again. Mr. Weaver, the leader of B.C.'s Green Party, is the new kingmaker in Canadian politics. B.C.'s shaky new government-in-waiting will only survive with his support. And his support emphatically does not include a pipeline. Blocking the Trans Mountain project, he declared, would be a "triumph of democracy."

Firing back from Italy, Mr. Trudeau sounded resolute. The pipeline decision was based on facts and evidence, he said, and "the facts and evidence do not change."

Story continues below advertisement

Read more: Discord over the Trans Mountain pipeline expansion rattles Canada's political landscape

Read more: Alberta-B.C. pipeline standoff 'at a turning point,' Notley says

Opinion: A historic moment for B.C. politics – and our environment

But the facts on the ground have changed virtually overnight. Mr. Trudeau now faces the unpleasant prospect of a pitched battle not only against the usual gang of environmental protesters, but against an entire provincial government. At stake is his government's credibility, and his own. Businesses will be reluctant to spend billions on resource investments if they don't believe the Canadian government can enforce its own decisions.

It wasn't supposed to be this way. Mr.Trudeau's climate-change plan was meant to strike a grand bargain between the economy and the environment that would make everybody happy. He promised we could have it all – jobs, growth, oil sands exports and a credible plan to cut greenhouse gas emissions (details to come). He would even, unlike Stephen Harper, get a pipeline built.

To be sure, Mr. Trudeau hasn't spent much political capital on Trans Mountain. He depended on his pal Christy Clark to do that. Her support may or may not have cost her the election. The re-election prospects of Alberta Premier Rachel Notley, his other ally, are getting dimmer by the day. Now the two provinces – both about to be led by NDP governments – are at open war. B.C. says it's not obliged to take environmental risks on Alberta's behalf, while Ms. Notley claims (correctly) that blocking the pipeline would be illegal. Mr. Trudeau can't please them both.

"There are no legal tools available to provinces to stand in the way of infrastructure projects that benefit all Canadians," Premier Notley said. But there are lots of other tools. The B.C. government can throw enough stones in the road to hold things up for years. It can refuse land-use permits and support First Nations and environmental lawsuits.

Story continues below advertisement

Our sunny-ways leader has badly miscalculated how much he could achieve through the magic of "social licence." Social licence means that businesses and governments must win popular consent for resource development by showing that they are good environmental stewards. Mr. Trudeau gambled that you can get people to agree to pipelines if you impose a carbon tax. It didn't work.

Instead, ungrateful Left Coast voters moved toward Mr. Weaver and the NDP. In other words, they told him to take his social licence and stuff it.

It's not hard to see why they feel this way. In B.C., the environment isn't just one consideration to weigh against many others. It's a sacred trust. Andrew Weaver's riding of Oak Bay-Gordon Head is among the nicest places on the planet. If you are lucky and rich enough to have a house by the ocean, you can see the orcas frolic during whale season. This is paradise, and the Trans Mountain pipeline is the snake, full of poisoned dilbit (diluted bitumen, which is heavy oil cut with chemicals). Evidence about risk and safety factors is beside the point. You can't let the snake into the garden, lest paradise be lost.

I don't doubt that plenty of people in Mr. Trudeau's own caucus see things this way, too. They, too, see the environment as a sacred trust. The prospect of being denounced up and down the coast of B.C. by thousands of environmentalists and Indigenous activists is not something they would relish.

As for Mr. Trudeau himself – who knows? Pierre, his dad, was not afraid to act tough, and he didn't care if people didn't like him. Justin is different. He's not a guy to pick a fight. And, so far, he hasn't had to make hard choices. What he does this time will tell us a great deal about what he's made of. Would you bet that Trans Mountain is built by 2019? Not me.