Twinkling and flashing furiously, slot machines at the Boomtown Casino are bleeping at empty seats. Only a handful of burly men occupy the poker tables and there are few drinkers around the bar. In Canada's youngest oil town, the gambling emporium is quiet.

After five years of frenetic building and activity, a race to extract crude from vast tracts of the Canadian oil sands has abruptly stalled, hit by a collapse in the price of a barrel of oil from a peak of $147 last July to barely $40.

At the heart of the Albertan oil rush, the tough northern outpost of Fort McMurray, 280 miles from Edmonton, is feeling the pinch. A quarter of the rooms are empty at the usually packed Nomad Inn. Wednesday night chicken wings at the Podollan sports bar attracted only a spartan crowd this week.

"They've slashed jobs, slashed projects, slashed budgets and everything else," says Barry Gillis, a pipeline insulator for the oil company Suncor, shivering in deep snow outside the Boomtown Casino.

Until recently, Canada's oil sands were the venue for one of the most spectacular races for profit of modern times. The remote, boggy landscape contains between 1.7tn and 2.5tn barrels of oil, of which an estimated 173bn can be extracted using expensive, hi-tech filtering technology. Canada's reserves are second only to Saudi Arabia's deposits, and a year ago 60 projects were being constructed by 25,000 workers living in temporary "camps".

But since oil prices began a downward tumble, energy companies including Shell, Syncrude and Petro-Canada have shelved more than US$90bn worth of oil sands investment. Charter flights ferrying staff from Newfoundland and Nova Scotia have been cut. Suncor, formerly Great Canadian Oil Sands Ltd, has suffered its first quarterly loss in 16 years. Last month one developer, BA Energy, became the first oil sands firm to file for bankruptcy protection.

"The economic environment has caused a crisis in the industry where planned investments have been put on hold," says Bob Dunbar of Strategy West, a Calgary-based consulting firm. "These are very expensive, capital-intensive projects. They need high oil prices to pay out the capital and earn an adequate return."

Left untouched for decades because it was considered too difficult to extract, much of the oil in the Canadian sands is well below ground in a thick, gloopy mixture of clay, water and bitumen. Extracting it involves pumping thousands of tons of steam through pipes under the surface, then using hi-tech filtration to purify the crude.

Deforestation

Analysts at Merrill Lynch estimate that oil needs to sell for $80 for companies to build the vast rigs required on the Canadian sands. If the commodity price falls below $32, existing facilities will make an operating loss.

The credit crunch has made it hard for oil companies to raise money, and a rapidly sinking global economy has hit demand. Merrill recently questioned if the sands were actually needed.

To make matters worse, ominous noises are coming from Washington. The oil sands have an appalling environmental reputation: they involve deforestation, require vast use of water, emit carbon and produce a murky waste of bitumen that is dumped in "tailing ponds" in the Canadian countryside. Barack Obama has vowed to wean the US off its addiction to "dirty, dwindling and dangerously expensive oil".

Canada is anxious to play its cards right. The US is its biggest customer and the country hopes to present itself as a friendlier source of oil than Venezuela or the Middle East. The issue is likely to be on the agenda when Obama visits Ottawa on 19 February in his first official trip overseas. Alberta's provincial premier, Ed Stelmach, this week invited Obama to visit the sands: "We know he is interested in energy issues and would love for him to come to Alberta and see the oil sands for himself."

Growing public anxiety about the environmental cost of oil from the sands peaked when 500 migrating ducks landed in a Syncrude waste pond last year and were poisoned by a mixture of bitumen and muck. The birds' death caused outrage, leaving a sour image and vindication for the green lobby.

But the economic cost of the slowdown could be high. The oil sands make up 1.5% of Canada's gross domestic product in 2000, and before the recent seizure in investment, the proportion was forecast to rise to 3% by 2020. An estimated 40,000 construction jobs are at risk.

"The worst is yet to come," warns Gil McGowan, president of the Alberta Federation of Labour. "People talk about countries like the Philippines being remittance economies, but there are a lot of communities in the hinterland of Canada that have been kept afloat by money brought home by men and women taking jobs on the oil sands."

Conspiracy theories abound among workers worried at the sudden evaporation in employment. Some speculate that the largely US-controlled oil sands developers want to pipe raw bitumen south of the border for cheaper processing in under-used American refineries, cutting out Canada's unionised workforce. Others suggest that the slowdown is a warning to the government to indicate that the oil companies are willing to pack up and leave if rules on emissions and the environment become too tight.

During the boom, builders, engineers and electricians could earn six-figure salaries if they could put up with living for weeks in breezeblock dormitories on the edge of the sands. The downturn has been swift and brutal.

"This is just another ploy for more profits," said Pete LaRocque, a Suncor worker who grew up in Alberta. "They're playing a game with my life, my livelihood and my ancestry."