Imagine the scene aboard Air Force One, on the tarmac in Copenhagen last Friday. Barack Obama is exhausted, having flown the Atlantic overnight to back Chicago’s bid for the 2016 Olympic Games. Mr. Obama is also humiliated, since his efforts on behalf of his adopted home town have been roundly spurned.

The U.S. President knows he is returning to a White House under siege. Healthcare, the economy, spiralling unemployment and other knotty issues are blighting a first term that began with so much promise. The very last thing Mr. Obama wants to talk about is America’s losing war in Afghanistan.

Enter General Stanley McChrystal, the U.S. and NATO commander in Afghanistan. The general, who has flown to Denmark after seeing Gordon Brown in London, is pressing hard for a surge of up to 40,000 extra U.S. troops to stave off what he warns could be a strategic disaster. Mr. Obama’s advisers who arranged the meeting know their boss has to get Afghanistan right, and time is not on his side. For 25 minutes, Mr. Obama and Gen. McChrystal chew over various Afghan policy scenarios, just as they did two days before in a teleconference, and as they will do again in more meetings with senior security staff over the next two or three weeks. This review will determine not only the future of U.S. military operations, but those of Britain, too. It may seal the fate of Hamid Karzai’s fraud-tainted government.

Having rushed his fences earlier this year, Mr. Obama is having serious second thoughts. With advice pouring in from all sides, the bottom line question is: will Mr. Obama pull the plug, will he downgrade the US commitment, will he cut and run, as hawkish Republicans will interpret it? Or will he heed Gen. McChrystal and escalate. Will he pursue a widening, indefinite war, will he risk a second Vietnam, as panicky Democrats see it?

The sacked diplomat Peter Galbraith’s weekend broadside alleging U.N. complicity in electoral fraud is but the latest of many considerations pushing Obama towards some variation of the latter downsizing option. Mr. Karzai’s manipulation of the vote had handed the Taliban its “greatest strategic victory in eight years,” Mr. Galbraith said. “Obama needs a legitimate Afghan partner to make any new strategy work.” In Mr. Galbraith’s estimation, and that of many in an increasingly anti-war Congress, he simply does not have one.

The weekend’s news that another eight U.S. servicemen have died in Afghanistan’s bloodiest year so far; polls showing that only 26 per cent of Americans believe more U.S. troops should be deployed; and the enormous financial cost of Washington’s involvement are all signs pointing to the exit. The refusal of most NATO states to fairly share the burden and the studied ambivalence of even Britain on troop increases combine to send the president a tacit message: you are fighting a losing battle.

From George Will of the American right to Tom Friedman and Bob Herbert on the progressive and liberal left, a commentariat consensus is forming that Mr. Obama should shift to a policy of containment, using special forces, aerial strikes and money in a more closely defined campaign to disrupt Al-Qaeda.

Forget nation-building, they say; do not try to eradicate the Taliban, for you cannot. Encourage “Afghanisation” by training the Afghan police, army and civil leaders to stand up for themselves. Learn the lessons of British and Soviet imperial history, before it’s too late. This switch is also forcibly urged on Mr. Obama by his vice-president, Joe Biden, and congressional Democrats.

New York Times columnist Frank Rich drew a parallel with John F. Kennedy’s time in office. All the advice from military commanders favoured a Vietnam escalation, Mr. Rich recalled. “Military leaders lobbied by planting leaks in the press. Kennedy fired back by authorising his own leaks, which, like Mr. Obama’s, indicated his reservations about whether American combat forces could turn a counterinsurgency strategy into a winnable war,” Mr. Rich wrote.

“Though Kennedy had once called Vietnam ‘the cornerstone of the free world in south-east Asia’ — he ultimately refused to authorise combat troops. He instead limited America’s military role to advisory missions. That policy, set in November 1961, would only be reversed, to tragic ends, after his death.”

Maybe history does repeat. For Mr. Obama, Afghanistan is looking increasingly like his Kennedy moment. — © Guardian Newspapers Limited, 2009

More In: Comment | Opinion