BAGHDAD – While concern is rising in the United States about the war in Afghanistan, the Americans are anxious to show evidence of progress in their other conflict — Iraq.

New Iraqi government figures tell a different story, however, showing civilian casualties hitting their highest level in more than two years — figures the United States rushed to dispute Sunday.

The rejection of the figures, compiled by the Iraqi ministries of defense, interior and health, comes at a delicate time. The American military has pronounced Iraq’s security as stabilizing and is going ahead with plans to send home all but 50,000 troops by the end of the month, leaving Iraq’s nascent security forces in control. The last American soldier is due to leave by the end of 2011.

Things were not much better in July for the Americans in Afghanistan — where U.S. losses were the highest for any month of the war. The monthly death toll — 66 — surpassed the previous record of 60 deaths in June. U.S. commanders have warned of more bloodshed as fighting escalates in longtime Taliban strongholds.

Moreover, at least 270 Afghan civilians were killed in the July fighting and nearly 600 wounded — a 29 percent increase over the previous month, according to Interior Ministry spokesman Zemeri Bashary.

In Iraq, the July death toll — 532 — was the highest since May 2008 when 563 died, heightening concerns over the country’s precarious security even as a political deadlock persists nearly five months after a parliamentary election produced no clear winner.

The new figures suggested that a resilient insurgency is successfully taking advantage of the political deadlock and shows the difficulties of achieving a political solution in a polarized society like Iraq’s, where ethnic and religious groups compete for power regardless of where national interests lie.

More than seven years after Saddam Hussein’s ouster, Iraqi politicians from these rival groups have failed to resolve key issues such as sharing wealth, the extent of provincial autonomy and identity.

The U.S. military countered that its own data showed only 222 Iraqis had been killed in July. “We do our very best to be vigilant to ensure the numbers we report are as accurate as can be,” spokesman Lt. Col. Bob Owen said in defense of the military’s own numbers.

An Associated Press tally indicated that at least 350 Iraqis were killed in July, but this figure is considered a minimum. The actual number is likely higher, as many killings go unreported or uncounted.

The three Iraqi ministries release casualty figures each month, but rarely if ever have they been so strongly disputed by the U.S. military as it worries about creating an image of withdrawing too soon.

The troubled transition to full Iraqi control serves as a warning for the United States and NATO as they pursue the same broad strategy in Afghanistan. In both countries, the war plan calls for weakening the insurgents on the battlefield while building up local forces capable of handling security while politicians pursue a political settlement.

Recent bloodshed in Iraq, where the transition is farther along, raises questions about how it will work in Afghanistan, where the challenges are far greater.

Unlike Iraq, Afghanistan has no tradition of strong central government. The country is made up of numerous ethnic groups speaking different languages with no ethnic community in the majority. Smaller groups — Tajiks, Uzbeks and Hazaras — harbor deep grudges against the Taliban, whose support comes from the Pashtuns.

That raises the possibility that if the coalition leaves too soon, the country would descend into civil war as it did after the Soviet pullout in 1989.

In Iraq, the country’s political impasse deepened this weekend, when a Shiite bloc nominally allied with Prime Minister Nouri al-Maliki’s coalition announced its rejection of his candidacy for a second term.

Late Sunday, Iraq state television released excerpts of an interview with al-Maliki, during which he said he would not insist on remaining prime minister as long as a partnership between his bloc and another Shiite coalition continues.