During his presidential campaign, Barack Obama drew a sharp but correct distinction between the wars in Afghanistan and Iraq. The war in Iraq, he said, was wrong and he pledged to end the US military presence there as soon as realistically possible. The war in Afghanistan, on the other hand, he saw as the pursuit of a just cause in defence of US national security that had been neglected by the diversion of forces to Iraq; he undertook to make it a priority of his presidency.
On taking office, Mr Obama swiftly honoured his promise on Iraq; most US troops have been withdrawn to barracks pending their phased return home. Deciding how to bring the war in Afghanistan to a successful conclusion has proved much more difficult. An early review of tactics and strategy dragged on. The perception of delay fuelled dissent at home, discontent among the allies, and accusations against Mr Obama that he was "dithering".
As pressure mounted on the US President to make up his mind, the situation on the ground in Afghanistan was continually shifting, with knock-on effects on American and European public opinion. Not only was the Taliban gaining territory, but widespread fraud called into question the validity of the August election and compromised what remained of the authority of President Karzai.
The US President finally set out his decision on Tuesday night, in an address at the US Military Academy at West Point – the same venue where eight and a half years before his predecessor had laid the foundation for the invasion of Iraq, rejecting containment in favour of pre-emption. Aside from a common sense of urgency, however, the two speeches could not have been more different. Where Mr Bush was all confidence and ideological certainty, his successor was coolly reasoned, but sometimes diffident. And where Mr Bush's world revolved around the United States, Mr Obama projected the United States as part of a broader and more variegated global landscape.
The central measure, that 30,000 more US troops should be dispatched to Afghanistan, had been well-trailed, allowing Gordon Brown to confirm the contribution of another 500 before it became a formal request to a junior ally from the US Commander-in-Chief. But Mr Obama's whole approach, from his careful phrasing to his grave demeanour, testified to the complexities of the Afghan operation and the risk that public support, on both sides of the Atlantic, might ebb away.
For all his lobbying, the US commander in Afghanistan has not entirely got his way: 30,000 is not the 40,000 he requested. Both the tactics and the objective have also shifted. Mr Obama did not speak like a President with all-out military victory in his sights. The extra troops are to be concentrated in and around cities, replicating the tactics of Soviet forces in the latter stages of their occupation. Training Afghan forces is the accompanying priority, with a view to handing Afghans responsibility for securing their country and permitting a timely withdrawal of foreign forces.
This is of a piece with early statements by Mr Obama and his advisers that victory in Afghanistan would not be won by military force alone, but by making Afghans feel safer. Yet the promotion of the exit strategy, with withdrawal to begin within 18 months, also reflects the decline in support for the war, not just in Europe, but in the United States. And by broaching departure at all, Mr Obama has created two new risks for himself: the first that the Taliban will melt away to regroup, confident that their time will come; the second – that the proposed timetable will not be met, even as Mr Obama faces re-election.
But there was another aspect to Mr Obama's address at West Point, which helps answer the question: what took the US President so long. Afghanistan, he argued, could not be seen in isolation – the overall geopolitics of the region had to be taken into account, as did the place of the United States in the world. And he went out of his way to insist that the US had no imperial ambitions and that its only interest in nation-building was at home.
In so saying, Mr Obama relaunched the interlinked foreign policy initiatives with which he started his presidency, his efforts to change the way in which the US sees itself and is seen around the world. It was always wrong to interpret the long wait for the decision on Afghanistan as evidence of the US President's weakness. His approach to Afghanistan, as set out this week, reflects a capacity for integrated thinking that his country, and his allies, should welcome, and hail, as a strength.