Tony Blair indicated yesterday that a phased withdrawal of British troops from Iraq could begin within six months in the first official confirmation of an exit plan. Speaking during a lightning visit to Basra, his fourth in the past 12 months, Mr Blair held out the prospect of a pullout beginning in the first half of 2006.

Mr Blair refused to divulge a specific timetable, but he sounded an optimistic note and gave the clearest signal yet of British military intentions.

Asked whether Major General Tim Dutton, the former British commander in southeast Iraq, had been right when he said troop withdrawals could begin in six months, the prime minister replied: "There is no reason why not, if everything goes to plan." He added: "The general is probably in a better position than me to give a timeline."

Mr Blair insisted the political and security situation in Iraq was completely different from that of a year ago.

"It is our strategy to draw down forces and we don't want to leave people here longer than we need to. The whole process is to build up the Iraqi capability in the armed forces and police so we can draw down our own forces. The political aspect can only be buttressed by a strong security aspect increasingly taken over by the Iraqis themselves."

Britain, which has 8,000 troops in Iraq, and the US, with 158,000, are both keen to cut back their military presence over the coming year. Donald Rumsfeld, the US defence secretary, who was in Baghdad yesterday, hinted that a preliminary decision had been made to cut US forces to below 138,000 for the first time.

As well as withdrawing the 20,000 troops sent in to increase security ahead of the election, Mr Rumsfeld said he was considering not replacing others. He said he may not deploy a brigade of the 1st Infantry Division from Fort Riley, Kansas, and a 1st Armoured Division brigade now in Kuwait. That would take the US presence below its long-time figure: 138,000.

Speaking to reporters at a British base near Basra, he said he was struck by the confidence the British troops to whom he had spoken had in their Iraqi counterparts. He added that the process of "Iraqisation" was well under way, despite preliminary election results showing a clear division of votes along sectarian and ethnic lines. He pointed out that the turnout - which may have reached 70% - was higher than in the UK general election and US presidential elections.

Mr Blair's comments followed hour-long talks with Zalmay Khlalzid, the US ambassador, and General Commander George Casey, the overall commander of forces in the country, on the political and military aftermath of the elections.

A senior US military source in Iraq told the Guardian: "There is a plan in place." He said the commanding officer in all 18 Iraqi provinces would have a series of issues to consider, including: the capability of Iraqi forces; level of insurgency; trustworthiness of police force; and degree of ethnic and sectarian violence. Only when all the boxes had been ticked would a province be considered ready for handover to the Iraqi forces and withdrawal by the US and British troops.

The prime minister's trip remained secret for security reasons, with a news blackout imposed prior to his arrival at Basra airport. He flew into Kuwait before crossing the border on an RAF Hercules. He transferred by helicopter to the Shaiba base, where he thanked troops in the regions for their efforts. he was accompanied by the head of the armed forces, General Sir Michael Jackson.

Jalal Talabani, the Iraqi president, suggested last month that all British forces could be out by December 2006. Any withdrawal could be delayed, however, if the tensions between Sunnis and Shias intensified. The Shia parties will form the largest bloc in parliament and could use the levers of power to persecute Sunnis.

Mr Blair said: "The real issue is whether they [the Iraqis] can find the way to get the unified government they obviously all want. Of course there will be people causing trouble. But 10 million people voted because they want democracy."