NAJAF, Iraq -- Militants filed out of the Imam Ali Shrine, closed the doors behind them and turned over the keys to Iraq's top Shiite cleric Friday, symbolizing their acceptance of a peace deal to end three weeks of devastating fighting in this holy city.
By Friday afternoon, dozens of Iraqi police and national guardsmen surrounded the shrine compound -- many kissing its doors and weeping -- as the government began to re-establish control over the Old City of Najaf. Some residents of the devastated neighborhood waved to them and yelled out, "Welcome. Welcome."
U.S. forces still maintained their positions around the holy site, with tanks about 300 yards from the shrine and jet fighters flying overhead, but the fierce clashes of previous days had ended and most of the battered city had fallen calm.
"Today, the Najafis can sleep well," Hamed al-Khafaf, an aide to Grand Ayatollah Ali al-Sistani, told Al-Arabiya television.
Dozens of the militants loyal to Muqtada al-Sadr piled their Kalashnikov rifles in front of the firebrand cleric's office here, but thousands of others were believed to be still armed, and some were seen pushing carts full of machine-guns and rocket launchers through a narrow alley.
The peace plan, presented by al-Sistani on Thursday and accepted by the government and al-Sadr, calls for the cities of Najaf and Kufa to be declared weapons-free, for all foreign forces to withdraw from Najaf and leave police in charge of security and for the government to compensate those harmed by the fighting.
The plan allowed al-Sistani, the most revered Shiite cleric in Iraq, to exercise his considerable authority and prove that he could succeed where other peace emissaries had failed. It gave the interim government control of the city, disentangled U.S. forces from the persistent violence here and let al-Sadr and his militants walk away free.
But it also allowed al-Sadr to keep his militia, which fought with U.S. forces here in the spring and could take up arms again.
A U.S. defense official, speaking on the condition of anonymity, said the U.S. military is wary of any agreements in Najaf because al-Sadr's militia has used previous breaks in fighting to regroup and rearm.
But the White House welcomed the agreement, though it cautioned that the administration was not aware of all the details.
"We welcome these steps to resolve the situation surrounding the shrine of Ali without further violence and we support the efforts of the Iraqi government to make sure that the rule of law applies throughout the country," White House spokesman Scott McClellan said.
The crisis appeared resolved Friday morning when al-Sadr issued a statement broadcast over the shrine's loudspeakers ordering his Mahdi Army militia fighters to lay down their arms and leave Najaf and Kufa.
"To all my brothers in the Mahdi Army ... you should leave Kufa and Najaf without your weapons, along with the peaceful masses," his statement said.
Thousands of Shiite pilgrims, who had come at the behest of al-Sistani, streamed into the shrine and mixed with the militants who had been holed up inside. The whole group then filed out, with some of the militants defiantly chanting, "Muqtada, Muqtada."
The doors of the shrine were then shut and the keys were handed over to al-Sistani's office, a symbolic and crucial step in ending the crisis.
Police later blocked roads to the Old City and searched the crowds streaming out of the shrine. Most of those leaving carried no weapons, but police detained four militants carrying grenades.
U.S. troops wandered the streets of the Old City without being shot at for the first time in days.
Army 1st Lt. Chris Kent said the peace agreement "appears to be a final resolution. That's what it looks like right now."
U.S. forces will remain in their current positions to ensure the cease-fire is implemented, said Capt. Carrie C. Batson, a spokeswoman for the 11th Marine Expeditionary Unit, which is responsible for the area.
U.S. and Iraqi troops were working "at the request of the local and national Iraqi government ... to ensure compliance with the terms of the agreement," she said.
Near the shrine, in an open air room at an abandoned religious court run by al-Sadr's followers, 10 bloated, darkened bodies could be seen Friday, covered in bloodied blankets.
Iraqi police discovered the corpses and said they were victims of the maverick court's summary brand of justice. But al-Sadr followers said they were victims of the recent fighting here.
An Associated Press reporter saw 10 bodies, including one of an elderly woman. It was not immediately clear how they died, but several had large gaping wounds that appeared to have been caused by shrapnel.
Also Friday, al-Sistani's office called for an investigation into the fatal shooting attacks on demonstrators who were marching on Najaf on Thursday.
Meanwhile, in the volatile city of Fallujah, a U.S. airstrike killed two people and wounded 11 others, including a 6-year-old girl, said Dr. Abdel Rahman Ahmad, of Fallujah General Hospital. U.S. warplanes also bombed the city's industrial zone, wounding two factory guards, hospital officials said.
The military said it was targeting an anti-aircraft gun mounted on the back of a truck. Militants "attempted to fire on one of our aviation assets and we responded with missile fire," said Lt. Col. Thomas V. Johnson, a Marine spokesman.
Witnesses said one airplane dropped at least two bombs in the eastern neighborhood of al-Askari, damaging at least 15 houses and destroying several cars.
Also Friday, a U.S. soldier was killed in a vehicle accident and a second seriously injured near Fallujah, some 40 miles west of Baghdad, the military said Friday. As of Thursday, 966 U.S. service members have died since the beginning of military operations in Iraq in March 2003, according to the Defense Department.
Later Friday, a U.S. warplane launched an airstrike in Fallujah. The military said it was targeting an anti-aircraft gun mounted on the back of a truck. Militants "attempted to fire on one of our aviation assets and we responded with missile fire," said Lt. Col. Thomas V. Johnson, a Marine spokesman in Fallujah. There was no immediate word on casualties.
In other violence Friday:
-- A car bomb exploded as a U.S. military convoy moved through a traffic circle on the western edge of the northern city of Mosul, wounding 10 Iraqi civilians and one U.S. soldier, said Army Capt. Angela Bowman.
-- Guerrillas in Baghdad attacked a U.S. patrol four times with grenades wounding 12 U.S. soldiers, the Army said. Four suspects were detained on suspicion of involvement in the attacks, the Army said.