James Robbins BBC diplomatic correspondent, in Baghdad
On a visit to Baghdad, Britain's Foreign Secretary David Miliband tells the BBC he has seen real progress in establishing a stable government in Iraq and British troops will continue to be withdrawn - but only when their work had been done.
Iraqi soldiers have been taking on militias in Basra
David Miliband came to Baghdad in the midst of major military operations against Shia militias.
In Sadr City, the Iraqi Army and American forces have been fighting to clear the area which has been the stronghold of Moqtada al Sadr's Mehdi Army.
"I'd heard before I came here that there was a new confidence in Iraq," the foreign secretary said.
"And now I've seen it, so that must make one more optimistic but equally one should never be glib.
"This is a country still with major, major, major challenges. Economic and social, but above all security and political challenges, and in the end it has to be politics that comes to the fore but it's going to need a very strong military presence to carve out the space that's necessary."
Rockets fired
Reports suggest that the militia forces have been pushed out of significant sections of the commercial area of Sadr City.
There has been a recent lull in rocket attacks launched from Sadr City and aimed towards the Green Zone where the Iraqi government and United States forces, led by General David Petraeus, are based.
Earlier this month, 150 rockets were fired in just 12 days.
David Miliband on his visit to Iraq
Iraqi Prime Minister Nouri al-Maliki, who held talks with Mr Miliband, believes a major blow has been struck against Shia militias, both in Sadr City and in the southern city of Basra, where both British and American forces have been fighting alongside two divisions of the Iraqi Army largely trained by the British.
A month after Iraqi troops were poured into Basra, the government says it has regained control there.
Many residents have reported feeling safer. There are accounts of music shops reopening, selling Western CDs and DVDs and of partying in the streets in areas where militias had previously enforced their interpretation of Muslim law.
'Clear mission'
The battle for Basra, however, has been tough. Iraq's prime minister went to the city to take personal charge in the early days of Operation "Charge of the Knights".
One Iraqi Army division, the 10th, is reported to have done well. Another, the 14th, much less so.
Britain's Defence Secretary Des Browne said in a statement to Parliament that the 14th Division was still months away from becoming fully operational.
The government says it is in control of Basra where shops are reopening
"The focus of UK forces is on completing the task of training and mentoring the 14th Division of the Iraqi army in Basra so that it develops into an effective force, able to ensure security without the need for our assistance," he said.
In an interview with the BBC, Mr Miliband rejected suggestions that the fact large numbers of American troop reinforcements had to be sent to Basra from other parts of Iraq and the Middle East was an indication British troops stationed at the airport outside the city were incapable of carrying out the mission.
Attitudes transformed
The foreign secretary said that was not their agreed task: "We've got a clear mission to train up the Iraqi security force, or that portion of it for which we are responsible.
"It's the conditions on the ground, the status of the Iraqi security forces that defines our decisions and that is, it seems to me, a very sound basis for proceeding.
"As we move forward through this year, as the Iraqi security forces gain strength and gain confidence and gain experience, then we'll be able to make further decisions about the deployment of British troops.
"But no one should be in any doubt, the prime minister and the defence secretary have made clear that the downward trend that they committed to last year, will continue this year."
It is clear that some things are changing quite rapidly in Iraq.
The offensive by a government led by Shia Muslims against fellow Shias in the militias has dramatically transformed attitudes to Prime Minister Maliki.
Critics of his inability to impose the authority of central government across Iraq have been startled by the strength of the army's efforts in Basra and Sadr City.
Some point out that the prime minister gambled a great deal, and that while the outcome is still not absolutely certain, there are signs many militia commanders have withdrawn, to protect themselves and elements of their forces.
Bookmark with:
What are these?