The US-led coalition is suspending offensive operations in the Iraq holy city of Najaf, after radical Shia cleric Moqtada Sadr offered a truce.
The coalition wants Sadr's militia disbanded
Coalition forces would gradually hand over to Iraqi security forces there, coalition spokesman Dan Senor said.
Mr Sadr offered to withdraw his men if the US also pulled back and shelved a murder inquiry against him.
Several weeks of clashes between the cleric's supporters and US forces have left hundreds of militia fighters dead.
Mr Senor said the coalition was "cautiously optimistic" about Mr Sadr's offer to end the fighting in Najaf, as well as in the city of Kufa.
He told a news conference in Baghdad that coalition troops would remain in Najaf until Iraqi security forces can resume their operations there and take control of strategic buildings from Mr Sadr's fighters.
"Until that time, coalition forces will suspend offensive operations but will continue to provide security by carrying out presence patrols," said Mr Senor.
Iraqi leaders had been urging both Mr Sadr and the US to end the fighting in one of Shia Islam's holiest sites.
Correspondents say the US itself was anxious to resolve the situation in Najaf before power is transferred to an interim Iraqi government on 30 June.
After the announcement of the truce, there were fewer militiamen in the centre of Najaf but Mr Sadr's supporters were still positioned on rooftops and on main roads, the French news agency AFP reported from Najaf.
"I hope the militia will leave soon," taxi driver Salah Jawad told AFP
The crisis has crippled Najaf's economy which depends on visits by pilgrims to its ancient Shia sites.
The truce offer was worked out by Mr Sadr and Shia leaders; the conditions were contained in a letter signed by the cleric.
Under the deal, Mr Sadr was to order his fighters from outside Najaf to leave the city and local militiamen entrenched around the Imam Ali Mosque to lay down their arms.
In return, coalition forces would return to their bases.
HOW CONFRONTATION UNFOLDED
End Mar: Coalition bans pro-Sadr newspaper; protests erupt
5 Apr: Coalition issues arrest warrant for Sadr
Early April: Rebellion spreads; clashes in Karbala, Najaf, Kufa
Mid-Apr: US steps up pursuit of Sadr in Najaf
14 May: Shia spiritual leader Ayatollah Sistani calls for end to Najaf fighting
23 May: Shia militias withdraw from Karbala centre
26 May: US troops seize key Sadr aide in Najaf
27 May: Sadr makes truce offer
If Mr Sadr lived up to his commitments, the coalition would play its art, Mr Senor said.
But he insisted that their demands that the cleric's militia, the Mehdi Army, be dissolved and disarmed throughout Iraq had not changed "one iota".
In his signed statement, Mr Sadr also called for talks with Shia political and religious leaders on the legal moves against him.
The coalition in April issued an arrest warrant for him in connection with the assassination of a rival cleric in April 2003.
Mr Senor said they were still insisting that he turn himself in.
It is not clear to what extent Mr Sadr was influenced by the arrest of his close aide and brother-in-law, Sayyed Ryad al-Nuri. He was seized by US troops early on Wednesday during raids in Najaf.
Hundreds of fighters loyal to Mr Sadr are believed to have been killed in fighting in Najaf, Karbala and Kufa since the Mehdi Army began its uprising against coalition forces in early April.
The clashes around Iraqi holy sites had angered many Iraqi Shias.