In Afghanistan, Barack Obama is in a hole at least partly of his own making. The decision he must make – and it may come this week – is whether or not to stop digging and start looking for a way out. The decision Britain must make – and the matter becomes more pressing by the day – is whether it will continue to allow its armed forces, its policy, and its standing in the world to be held hostage to American political calculations.

Obama set a trap for himself during last year's presidential campaign when he defined Afghanistan as a "war of necessity" in contrast to Iraq, the Republicans' "war of choice". In Afghanistan, he suggested, America was somehow fighting the good fight. Soon after taking office, he escalated US involvement by agreeing to a request from his then commander, General David McKiernan, who he later sacked, for an additional 20,000 troops. Obama seemingly gave the order without much thought. Then he let things drift. Now, faced by record and rising military and civilian casualties, the egregious embarrassment of President Hamid Karzai's fraudulent election "victory", spiralling military expenditure (it is now estimated that it costs $1m to deploy one American soldier for one year), mutinous allies, an increasingly destabilised Pakistan, and growing public unease, Obama is belatedly giving Afghanistan a great deal of thought indeed.

In these ponderings the spectre of Vietnam and the fate of Lyndon Johnson loom large. Whatever force levels Obama eventually settles on, whatever strategic plan he finally adopts, it is already clear, given the historical precedents to which he is attuned, that he will insist on a time-limited military engagement. Rejecting the various options presented to him by the Pentagon last week, Obama said, in effect, that he did not just want a winning strategy. He wanted an exit strategy, too. That makes good sense. But primarily, it's party political good sense. Obama's deadline for substantive, quantifiable progress in Afghanistan is spring 2011 – at the latest. After that his re-election campaign begins. He and the Democrats are desperate to avoid running against a background of bodybags. Some say he will be looking for results by autumn next year, ahead of the Congressional mid-term polls.

It is in this brutishly pragmatic, unyielding and essentially uncontrollable foreign context that British policy is currently held hostage to American political calculations. The unpalatable reality is, whoever holds power in Downing Street cannot exercise independent military options, however rational and necessary they may appear.

Britain can nudge and push, as Gordon Brown has lately tried to do. But Obama isn't really listening to London or, indeed, to any of his Nato allies.

On the one hand, a unilateral British "defection" on Afghanistan is unthinkable in terms of London's overall strategic calculus, pivoted on maintaining the American bilateral relationship and the coherence of Nato. Such a move might even trigger an allied and government collapse in Afghanistan. On the other hand, the British public remains doggedly unpersuaded by Brown's central argument that fighting "terror" in Afghanistan makes British streets safer. That leaves the question, is Britain irredeemably trapped?

The answer is no. Brown should set aside his mis-targeted fixation with al-Qaida, a much diminished threat. Instead, he or his successor should be pressing for more focused, better defined use of Nato military power to protect Kabul and other main population centres and key trade and communications routes. Offensive combat missions should be de-emphasised wherever possible. Britain should redouble its efforts, via Nato, to build up Afghan security capacity, especially army and police, but also local tribal militias. It should increase its non-military aid, development and reconstruction assistance, and urge others to do so, too.

Britain should use diplomatic and commercial levers to help Afghanistan develop viable and credible political institutions, with emphasis on local and provincial governance. Nato and the UN should actively pursue talks with traditional leaders and those disparate groups sometimes characterised as "moderate Taliban" – and be prepared if necessary to buy their allegiance. Britain can and should try all these things; some of it has already begun. But henceforth Britain's overall approach should proceed from a new premise. The premise is that, whatever the Americans decide, Britain will, privately and/or publicly, set a date for the beginning of a UK military withdrawal. That date might sensibly be 31 December, 2010.

Despite his mistakes and his high-handedness, Obama deserves a chance to turn things around. But he does not deserve carte blanche. A British withdrawal timetable would concentrate American minds (and would not necessarily be at odds with Obama's political deadlines). It would shake up Karzai more effectively than a hundred of Brown's famous telephone harangues. And, at home, it would reassure the armed forces and an anxious public that, while continuing to do its best in a nigh-impossible situation, Britain is not prepared to stay in Afghanistan indefinitely.