The defeat has been barely noticed by the media. Amidst the rolling hills of Quebec's lush farm and wine region, the small town of Dunham has beaten the oil giants.

It's here that Enbridge and Portland-Montreal Pipe Line – owned by Imperial Oil, Suncor and Shell – have been trying to construct a pumping station to pipe heavy crude over a nearby mountain range. The infrastructure is integral to Enbridge's plans to ship Alberta tar sands, via Quebec, to the eastern coast of the United States.

But when Enbridge quietly initiated this project in 2008, a coalition of local farmers, residents and environmentalists formed in opposition. They marched, launched legal challenges, and organized Canada's first UK-inspired climate camp – which ended in promises of civil disobedience.

The oil companies fought back in court. Enbridge dropped the project's initial name – "Trailbreaker" – to fool residents into thinking they had abandoned their broader plans to ship Alberta tar sands. The federal government even dispatched spies to intimidate community organizers. But ground down by Dunham's efforts, the companies withdrew last month. They still want a pumping station in Quebec – they just won't be able to build it in this town.

The triumph may herald the fate of two massive tar sands pipeline projects that loom over central and eastern Canada. The first is Enbridge's now-unnamed plan, which involves reversing a network of east-to-west pipelines that currently carry African and European oil. This would bring 300,000 barrels of Alberta tar sands daily to the US seaboard. The other is TransCanada's recently announced Energy East, a $12bn project to convert a natural gas pipeline and build an extension in the provinces of Quebec and New Brunswick. It could ship as many as 1.1m barrels per day to Canada's coast.

Business leaders, politicians and the media are exclaiming, in patriotic tones, about the potential boost to the prosperity and energy security of all Canadians. "This is truly a nation-building project that will diversify our economy and create new jobs here in Alberta and across the country," Alberta's premier Alison Redford declared about the Energy East. "Each of these enterprises required innovative thinking and a strong belief that building critical infrastructure ties our country together, making it stronger and more in control of our destiny," added TransCanada CEO Russ Girling.

The exercise in flag-waving is intended to sell a single precept: that oil companies' interests should be confused with ours. If the soaring rhetoric is an indication of anything, it is the growing desperation of Alberta's oil barons and their allies in government. With a protest movement having to date blocked the construction of TransCanada's Keystone XL pipeline south to the Gulf Coast, and Enbridge's Gateway pipeline west to the Pacific, Alberta's oil companies are sitting on top of rising but landlocked bitumen production. And as their crude sells at a reduced price, they are losing billions in profit.

Thus the frantic drive for an eastern ocean route is not about the needs of ordinary Canadians: it's an export plan to serve the needs of corporate bottom-lines. Once the crude reaches the coast, it will fetch higher prices on the world market and go to the top bidders: the United States, Europe, India and China. What piped tar sands goes to eastern Canadians' may turn out to be unwanted: as Canada's oil prices align with the world's, consumers at the pump may pay even more.

If the benefits will be captured by the oil companies, the risks will be carried by everyone else. Pipelines are easily corroded by tar sands crude. An international expert on pipeline safety has already warned there is a "high risk" Enbridge's pipeline will rupture because of cracking and corrosion. TransCanada's pipeline, built in the 1950s, is even older.

The economic consequences are just as drastic. Every pipeline that is built will further ensnare the Canadian economy: locking it into a boom-and-bust resource-dependency, whose petrodollar has already hollowed out Canada's manufacturing core and destroyed hundreds of thousands of jobs. And it will also lock Canada into carbon-intensive production, at exactly the moment when other countries are transitioning to low-carbon energy and preparing to mitigate the impacts of climate change.

In other words, these aren't pipelines to build a nation. They are a scheme by which to swindle it.

The flimsiness of their case is why the oil barons have turned to other tactics. To split labour unions from the opposition, TransCanada and Enbridge have taken to inflating the jobs that might be created. Their template is no doubt being drawn from the fight over the Keystone XL in the United States, during which TransCanada promised as many as 20,000 to 40,000. When economists crunched the figures, they landed on a different total: as few as a thousand temporary jobs, and only twenty permanent ones.

And neither company is shying away from conflicts-of-interest – they seem in fact to depend on them. The media has reported that Enbridge has handed out "donations" to municipalities along the path of its pipeline, including $44,000 to an Hamilton, Ontario police station. The method may be better described by an old-fashioned term: bribery. And TransCanada has just hired a company to lead their lobbying charge in Quebec. Who else do they work for? The same municipalities they intend to lobby.

As pipelines have become one of the most visible – and vulnerable – instruments disfiguring Canada's environment, economy and democracy, they have spawned an inspiring development. Where-ever they've been proposed, their path is tracing the contours of a new resistance. In the last month alone, we've seen protests in Winnipeg, occupations in southern Ontario, mobilizations in Ottawa and Toronto, and blockades in New England, building on resolutions declaring several US cities "tar-sands-free" zones. The only nation-building that is occurring appears to be a coast-to-coast movement of opposition.

But it is the movement simmering in Quebec that will be most fiery, and decisive. Intensely environmentally-minded, Quebecers won one of the world's first moratoriums on shale gas exploitation. Its population is still reeling from an oil train explosion in Lac-Megantic that left 47 people dead – and whose $200 million clean-up cost they may have to foot themselves, after the US company responsible declared bankruptcy to avoid liability.

Quebecers confront a Parti Quebecois government whose top party members are closely linked to the oil and gas industry. Environment minister Daniel Breton briefly made waves when he harshly criticized the idea of shipping tar sands through Quebec and promised to closely scrutinize the plan. But a few weeks later – the same day Enbridge filed an application for their pipeline with Canada's energy regulatory body – Quebec's premier Pauline Marois booted Breton out of her cabinet. "A total coincidence," insisted an Enbridge spokesman. Mere chance indeed.

In the face of mounting opposition, the Quebec government has promised a public consultation on the Enbridge pipeline, though not yet on TransCanada. While it will prove an opportunity for dissent, the consultation is a charade: it will determine not whether the pipeline project should proceed, but on what terms. Rarely has a nationalist Quebec premier caved in such brazen ways to the interests of oil corporations and the federal government. It leaves only one question: how long before Quebecers call for her head?

If the signs are correct, the victory over the oil barons being celebrated in Dunham, Quebec won't be the last.

• Follow Martin on twitter: @Martin_Lukacs