At first glance, it's what the Americans call a no-brainer, a decision so obvious it doesn't require an instant's thought. You are the world's biggest importer of oil, spending hundreds of billions of dollars a year to prop up unstable or downright hostile countries that happen to produce the precious stuff. Then your next-door neighbour, a proven friend and your biggest trading partner, offers to build a pipeline to provide you more of its own oil. The deal means greater energy security, not to mention thousands of new jobs, a year before you face a tricky re-election campaign in which high unemployment is likely to be the make-or-break issue. Truly, a no-brainer.
Except it hasn't worked out that way. By the end of the year, the Obama administration is supposed to give final approval for the 1,700-mile Keystone XL pipeline, that would carry up to a million barrels a day of oil, some 10 per cent of US import needs, from Canada to refineries on the Gulf of Mexico. The decision not only seems certain to split the Democratic Party, but it will also say a great deal about the core beliefs of a president who stands for so much – but, it often seems, for nothing very passionately.
For the oil that would flow through Keystone XL is not just any oil. It comes from the Alberta tar sands, which contain economically recoverable reserves equal at least to those of Saudi Arabia. Unfortunately, production from this super-heavy bitumen generates three times as much greenhouse gas as conventional oil.
For the Republican candidates jostling to oppose Mr Obama next November, the latter consideration, of course, hardly applies. Climate change, they believe, has nothing to do with humans, while the venture is just the sort of bold private-sector investment that creates jobs and revitalises the economy: government should get out of the way and give business its head. Indeed, listen to Rick Perry, the governor of Texas and one of the frontrunners for the nomination, and you would imagine that America's every woe could be solved by an oil derrick in everyone's back garden.
For Democrats, however, Keystone XL is the wedge issue from hell. It pits two of Mr Obama's key constituencies against each other. On one side are the unions, a major source of Democratic funding and a key grassroots organising force for the party, who naturally are unequivocally in favour of the pipeline because of the estimated 20,000 jobs it will generate.
On the other, however, stand environmentalists from the liberal wing of the party that most fervently backed Mr Obama in 2008, and whose enthusiasm will be sorely needed if he is to secure a second term. But environmentalists' faith was heavily dented by the President's decision in September to halt plans to impose more stringent clean-air standards – announced on 2 September, the very same day the government reported that no new jobs were created by the economy in the month of August.
A go-ahead for the pipeline would be portrayed by liberals as more evidence that, when push comes to shove, Barack Obama will yield to corporate clout. In recent days, the divisions have only deepened. More than 20 Democratic congressmen have written to the President urging him to support the scheme, but Harry Reid, the Senate majority leader and the most powerful Democrat on Capitol Hill, warned that anything was preferable to increasing dependence on "unsustainable supplies of dirty and polluting oil".
Not so long ago, everything seemed plain sailing for Keystone XL. Because the pipeline crossed an international border, it fell to the State Department to judge its environmental impact. The Canadian government lobbied heavily for the project, and in November 2010, with memories of BP's Deepwater Horizon spill fresh, Hillary Clinton, the Secretary of State indicated that she was "inclined" to grant a permit. It was, she said, "a choice between "dirty oil from the Gulf or dirty oil from Canada".
Then came the counter-attack, spurred in part by the verdict of the federal government's own Environmental Protection Agency that the State Department's review process was "inadequate". Scientists and environmental groups, even farmers in South Dakota, Nebraska and Kansas, made common cause – the former warning that increased production from the tar sands would render futile all efforts to hold back climate change, the latter fearful that a pipeline leak could contaminate the shallow Ogallala aquifer on which the Great Plains depend for irrigation and drinking water.
By August, demonstrations were taking place outside the White House, and Hollywood was getting into the act. The crude from Alberta was " the dirtiest oil on the planet", Robert Redford declared, as he urged Mr Obama to "stand up for the future you know we deserve ... and say 'no' to the Keystone XL". Some noted that in 2007, none other than George W Bush had signed a law banning the government from buying fuel with a higher carbon footprint than ordinary oil. If tar-sand oil was too much even for the "Toxic Texan", surely it was too much for Barack Obama?
There, for now, matters stand. The White House urges liberals not to lose faith, pleading with them to consider what evils might be visited upon the environment if a Republican won in 2012. The official mantra remains that the US must somehow end its addiction to oil, by switching to renewables and other "green" sources of energy.
But the much-publicised bankruptcy this summer of Solyndra, a solar panel company that had received $535m in federal loans, tells another story. The affair is not the political graft scandal some Republicans suggest, rather a well-meaning investment that failed. But the story of Solyndra only underlines how hard it will be to find a speedy alternative to oil.
In the short term, however, politicians must create an economy that generates jobs and wins them elections. And the two goals may well be irreconcilable. "To govern is to choose among disadvantages," Charles de Gaulle once said. Barack Obama knows exactly what he meant.