STEPHEN HARPER has spent plenty of political capital persuading Barack Obama's administration to approve Keystone XL, a pipeline would carry 830,000 barrels a day of crude oil from Alberta's tar sands to American refineries. The Canadian prime minister dispatched convoys of ministers to Washington, DC, to schmooze their counterparts. He even lobbied the president personally, most recently at a G8 meeting last month in Britain. So when on July 24th, in an interview with the New York Times, Mr Obama quipped that the $5.3 billion project would create 2,000 temporary jobs and just 50-100 permanent ones, far fewer than its backers predict, in diplomatic terms it amounted to kick in the teeth. The president then proceeded to hector Canada to do more about climate change as a condition for his thumbs-up.

The Canadian government seemed to take Mr Obama's remarks on the chin. Only Gary Doer, the Canadian ambassador in Washington, feistily pointed to a previous report by the State Department which estimated that Keystone XL could create employment for as many as 42,100. The White House did not explain the discrepancy. But neither did the president change course. On July 30th he reiterated that the pipeline would create only 50 permanent workplaces and criticised Republicans for calling it a jobs plan.

Mr Obama has always been cautious on the merits of the 1,900km (1,180-mile) pipeline, which has become a bête noire for American and Canadian greens. To the annoyance of industry lobbyists, the president continues to talk of “tar sands”, a label they have tried hard to replace with a less dirty-sounding “oil sands”.

The president's insistance on fighting climate change strikes a nerve in Canada. The North American neighbours are committed to identical targets for reducing greenhouse-gas emissions (to 17% below 2005 levels by 2020). But whereas Canada’s emissions have risen since 2009, they have fallen south of the border, in part because cleaner, gas-fired power stations are replacing old coal-burning ones. In Canada, which already relies on hydropower and natural gas for most of its electricity generation, oil production is the fastest growing source of emissions.

The Conservative government has been reluctant to turn down the taps, and ridiculed the opposition's demands to put a price on carbon, which would help keep emissions in check. It has also dragged its feet on regulations to cap emissions from large industrial users (draft rules covering the oil sector promised for July 1st have yet to appear), though Mr Obama’s comments may prompt it to speed up the process—and to come out with more substantial ideas on climate change before the president makes his final decision later this year.

That would be a big shift. Before Mr Obama's interview with the Times, Joe Oliver, the minister for natural resources, insisted that Keystone XL would win approval if only the Obama administration stuck to “facts and science”. Perhaps. But Mr Obama is unlikely to ignore a third element: domestic politics.