The Iraqi government continues to rely on American forces and expertise to preserve security. Shiite militias would lose some of their rationale for existence, and Al Qaeda and Sunni insurgents could lose a useful foil. For the United States, domestic political concerns would also make it easier to sell an extension to a war-weary public if there were fewer casualties.

“The militia groups involved are being paid by the Iranians to make trouble for the Americans, and that means that their main objective is no longer there if the Americans withdraw all their troops,” said Joost Hiltermann, the International Crisis Group’s deputy program director for the Middle East . “It doesn’t mean they won’t exist altogether, but their violence will be harder to justify.”

American military and diplomatic officials said Iraq has not only pressed the militias, but also sent word directly to Tehran to back off on attacks. The Iranians had used the militias, which are primarily based in the southern part of the country and Baghdad, to wage a proxy battle with the Americans for dominance and influence in Iraq. Those militias were responsible for 12 of the 14 deaths in June, many the result of rocket or mortar attacks on military bases.

American officials increased pressure on Iraqis to clamp down after the spate of attacks in June, and Iraq eventually responded. The government increased its counterterrorism operations against the militias, brought judges from Baghdad into the southern part of the country to ensure those captured were not summarily released, and replaced poorly performing generals, officials said.

Colonel Crissman, who worked with the Iraqi forces, said that at times they needed some additional prodding. “We did targeting on our own and some hand-holding of the Iraqis,” he said.

Newsletter Sign Up Continue reading the main story Please verify you're not a robot by clicking the box. Invalid email address. Please re-enter. You must select a newsletter to subscribe to. Sign Up You will receive emails containing news content , updates and promotions from The New York Times. You may opt-out at any time. You agree to receive occasional updates and special offers for The New York Times's products and services. Thank you for subscribing. An error has occurred. Please try again later. View all New York Times newsletters.

In July, nearly two-thirds of the Iraqi counterterrorism missions were aimed at Iranian-backed militias, compared with just a fifth of all missions in the first six months of the year. In the first half of the year the Shiite-led government focused on Al Qaeda and other Sunni insurgent groups, according to Maj. Gen. Jeffrey Buchanan, the military’s top spokesman in Iraq.

The operations and diplomatic efforts, according to American officials, significantly reduced the number of rocket attacks on military bases, particularly in southern Iraq, where the militias most frequently operate. In a single day in July, a base in the southern province of Maysan was attacked with rockets 43 times. The attacks in southern Iraq were so bad in July that the United States military took the unusual step of bombing open swaths of desert with a C-130 gunship and an Apache helicopter in the middle of the night to try and deter the militias.

“We used them out here as a demonstration to say these are the capabilities we have, and we are willing to use it to protect ourselves,” Colonel Crissman said.

Advertisement Continue reading the main story

The crackdown and the American use of force appear to have helped. In August, there were days when none of the American bases in southern Iraq received incoming fire.

“I wish U.S. service members could take full credit for being responsible for this, but it’s absolutely a combination of things coming together, particularly the Iraqis acting against the militias,” Colonel Crissman said.

Ali al-Moussawi, an adviser to Prime Minister Nuri Kamal al-Maliki , said, “Part of the reason for the drop in troop deaths has been the growth and development of the Iraqi security forces.

“Providing security for the citizens and every one inside of Iraq is the duty of the government, even the foreign troops that are in Iraq legally,” Mr. Moussawi said. “The security breaches we’ve had in Iraq are not because of the militias. The security breaches we’ve had have been suicide bombers and other kinds of attacks. That is what worries us now.”

Colonel Crissman and other military officials cautioned that the August figures did not mean that Iraq was suddenly safe, either for the United States military or the Iraqis. They said that as the United States began to withdraw its troops in the coming months, there would likely be a resurgence in attacks as militias and insurgents tried to claim responsibility for pushing the Americans out of Iraq.

As much as the Iraqis have clamped down on the militias, their security forces are still struggling to thwart attacks from Al Qaeda and other Sunni insurgents. On Aug. 15, those insurgents pulled off a devastating series of attacks across Iraq, killing more than 90 people and wounding more than 300. None of those attacks, however, were aimed at Americans. Since then, there have been several suicide bomb attacks, including one inside a mosque on Sunday that killed more than 30 Iraqi civilians.