Gordon Brown prepared the ground for a historic realignment in the "war on terror" yesterday by setting out a four-point plan for withdrawal of British troops from Iraq by the end of next year.
Although he is refusing to set a detailed timetable for withdrawal, it is clear Mr Brown is in agreement with the US presidential candidate Barack Obama on the need for military action in Afghanistan to take priority. Both appear to be working to a 16-month timetable.
While Mr Brown addressed troops in Basra and met Nouri al-Maliki, the Iraqi Prime Minister, the Democratic hopeful arrived in Afghanistan to declare the US mission there to be more important than that in Iraq. Mr Obama is expected imminently in Iraq, and he will continue on to Europe. He will meet Mr Brown in Downing Street on Saturday.
Their approach is a marked departure from the policies of Tony Blair and President George Bush. But it nonetheless carries echoes of the "shoulder-to-shoulder" relationship between Britain and the US – if Mr Obama defeats his Republican rival John McCain in the November election.
Mr Brown, who will detail his plans to the Commons on Tuesday, laid out four conditions for withdrawal: the successful training of the Iraqi army; provincial elections to take place; the economic reconstruction of the country; and finally handing over sole responsibility of Basra airport to the Iraqis. Mr Brown said: "I am not setting an artificial timetable but what I can say is there is very significant progress in all these areas. Then we will reach a conclusion about what troop numbers will be. It is certainly our intention that we reduce troop numbers."
Some 20,000 Iraqi army soldiers have been trained so far, while Downing Street said it hoped provincial elections would be held at the end of this year.
According to the Iraqi Prime Minister's office, Mr Brown signalled that British troops could carry out a complete withdrawal by July 2009, but no exact timetable had been spelled out, British officials said.
When Mr Brown addressed British troops in Basra later, he told them they were close to finishing the job in Iraq. He said: "You are now working with the Iraqi forces to train them up, so that they can take over the responsibilities and we can complete our work here in bringing Basra to democracy, security and prosperity."
Mr Brown appears to be pinning his hopes of a revival to his leadership domestically on the suggestion that the final British soldier could be out before the 2010 general election.
The joint approach with Mr Obama also indicates Downing Street believes Mr Obama is more likely to win the US presidential election than Mr McCain. No 10 officials could avoid any suggestion of favouritism, however, by pointing to an agreement last week by President Bush and the Iraqi Prime Minister to set a "time horizon" for reducing American forces in Iraq.
Mr Maliki also appears to be getting ready for an Obama presidency, with a German magazine quoting him as saying he wanted US troops to withdraw from Iraq. "Barack Obama talks about 16 months," he told Der Spiegel. "That ... would be the right timeframe for a withdrawal, with the possibility of slight changes."
Mr Brown's one-day trip was designed to show that progress is being made in preparing to hand over complete control of Basra, and shift the focus of Britain's military commitment to Afghanistan. A senior British official said the UK's strategy in Iraq was "moving beyond the conflict period", pointing out there have been only two British military fatalities this year.
The IoS poll reveals the widespread public demand for an immediate withdrawal from Iraq. Nearly three-quarters – 74 per cent – of people want British troops to return to the UK as soon as possible, up from two years ago, when 62 per cent said troops should be pulled out. Today's poll also shows that 66 per cent believe Britain should never have become involved in Iraq in the first place.
Mr Brown is expected to tell MPs on Tuesday that the number of combat troops can be scaled down from next year, in a clear move to bolster his leadership and help his party to defend Glasgow East against the SNP in Thursday's by-election.
Last autumn, Mr Brown tried to set a timetable for partial withdrawal by announcing that Britain's commitment would be scaled back from 4,000 to 2,500 by this spring. But changes to the Iraqi army have sent this plan awry.
Gunning for Gordon
The image above reportedly turned a Downing Street press officer "white with shock" – Gordon Brown sat behind a Puma helicopter's machine gun during yesterday's visit to Baghdad. Mr Brown had not posed for the shot: he had merely turned to chat to the gunner who let go of his weapon. Sensing a public relations disaster Mr Brown's secretaries tried to intervene, but too late. The picture had already been wired around the world.
To have your say on this or any other issue visit www.independent.co.uk/IoSblogs