Representatives of Iraq's main Shiite Muslim factions signed a deal Monday clearing the way for Iraqi soldiers to operate throughout Sadr City, a vast Baghdad slum that is largely under the control of militiamen loyal to firebrand cleric Muqtada Sadr.
The signatures put an official seal to a truce brokered over the weekend by Sadr's political representatives and members of Prime Minister Nouri Maliki's governing alliance.
Negotiators said they hoped the deal would mark the close of more than seven weeks of fighting in the district, which has claimed hundreds of lives. But it was unclear whether all the groups that have taken up arms in Sadr City would adhere to the accord.
The U.S. military said its troops in the southeastern portion of the district had come under attack at least three times and had killed three gunmen since the deal began to take effect Sunday. Iraqi soldiers had also traded sporadic fire with neighborhood fighters, residents said. The district's two main hospitals had received four bodies and treated 24 wounded since late Sunday, officials said.
Some militia members said they were waiting for orders from Sadr himself before setting aside their weapons. But Sadr's chief negotiator, Salah Obeidi, said Monday that the cleric had issued written instructions authorizing his representatives to sign the deal and urging his followers to uphold it.
The fighting erupted in late March when Maliki's government began a crackdown in the southern oil hub of Basra aimed primarily at Sadr's Mahdi Army militia.
The government said the operation was intended to restore order in the lawless city, which generates most of the country's crucial oil revenue. But Sadr's followers accused factions within Maliki's alliance, one of which also has an armed wing, of using the crackdown to weaken the cleric's movement ahead of provincial elections slated for the fall.
The fighting in Basra subsided in five days, but the crackdown sparked an uprising in Sadr City and other Shiite neighborhoods in Baghdad that has dragged on for weeks.
The U.S. military says that more than 1,000 rockets and mortar rounds have been fired in Baghdad since late March, most of them from Sadr City. The shelling has killed at least 28 people and injured 257, according to military figures.
Many more have died in the daily exchanges in Sadr City and surrounding areas, where U.S. tanks and attack helicopters trade fire with militants armed with machine guns and rocket-propelled grenades.
U.S. forces last month moved into the southern third of Sadr City, from which shells were being aimed at their bases and the Green Zone, the fortified enclave across the Tigris River that houses the U.S. Embassy and many government offices. The troops are sealing off that Sadr City area with a 3-mile-long concrete barrier that is about 80% complete.
But U.S. and Iraqi commanders did not want to provoke an all-out showdown with the Mahdi Army by pushing into the rest of Sadr City, a district that is home to an estimated 2.5 million people.
Under the deal, all sides were to suspend military activity for four days beginning Sunday, after which Iraqi forces will have free rein to search Sadr City for weapons and fighters, provided they have a warrant. A committee supervised by Maliki will monitor operations and investigate any reported abuses.
In return, the governing parties have pledged to open more roads into the district, increase humanitarian assistance, compensate residents for their losses and help the thousands of displaced to return.
Khalid Attiya, parliament's deputy speaker who led negotiations for Maliki's alliance, described the deal at a joint news conference Monday as a "road map to implement stability in Sadr City and the rule of law." But both sides acknowledge the way is riddled with potential pitfalls.
Maliki insists that the Mahdi Army must ultimately be disbanded, a point Sadr's followers are not prepared to discuss.
Sadr's representatives have emphasized that they will not accept participation of U.S.-led forces in searches. Obeidi said the governing alliance assured his team that Iraqi forces would have no need to call for U.S. assistance, provided Sadr's followers cooperate.
However, it remains unclear how much control Sadr has over the men who operate in his name. The U.S. military says most of those fighting in Sadr City are members of breakaway factions it alleges are armed, trained and directed from Iran. Tehran denies the charges.
The U.S. military did not immediately comment on Monday's signing. But Navy Rear Adm. Patrick Driscoll, a military spokesman, has previously said that the U.S.-led forces support a diplomatic solution to the standoff.
Special correspondents in Baghdad contributed to this report.