WASHINGTON — Ever since Army Gen. David H. Petraeus was appointed to oversee the U.S. military in Iraq more than a year ago, the primary enemy for his troops has been shifting.
When Petraeus left for Baghdad, the Pentagon considered radical Shiite Muslim cleric Muqtada Sadr the gravest threat. Once he arrived, it switched to Sunni Arab extremists claiming affiliation with Al Qaeda, an old foe.
This week, things changed again. In two days of Capitol Hill testimony, Petraeus declared Iranian-backed "special groups" -- hardened fighters who are part of larger Shiite militias -- to be the "greatest long-term threat to the viability of a democratic Iraq."
The shifting U.S. view of its top enemy reflects both the changing nature of the conflict and the complexity of Iraq's array of armed groups. As threats from Sadr and the insurgent group Al Qaeda in Iraq receded, others were magnified.
Despite new intelligence, officials can't agree whether it shows Iran in control of Iraq's Shiite factions or merely as one key player.
U.S. accusations that Iran is training and equipping Shiite militias in Iraq, which Tehran has long denied, are hardly new. But the suspected prominence of the special groups has been cast in a harsh new light by Iraqi Prime Minster Nouri Maliki's recent military offensive in the southern city of Basra. There, senior U.S. officers charged, these groups played a central role in fighting government troops to a standstill.
At the same time, Iran's suspected role in last month's fighting has sparked an intense debate within U.S. military and intelligence communities over how much control Tehran has over events in Iraq.
According to U.S. officials involved in Iraq policy, most government experts agree that last month's fighting enabled the United States to gather more detailed information about Iran's motives and operations in Iraq.
"I think the developments in Baghdad and Basra over the last couple of weeks have been very instructive on a number of levels," Ryan Crocker, the U.S. ambassador to Iraq, testified this week as he accompanied Petraeus at the marathon hearings.
"Because the general level of violence is down, we could see, I think, much more sharply defined what Iran's role is in the arming and equipping of these extremist militia groups," Crocker said.
In their congressional testimony, Petraeus and Crocker suggested that Iran's role in last month's fighting, and in Iraq as a whole, extended well beyond directing the special groups and their fighters in Baghdad and Basra.
Most significantly, Petraeus agreed that Iran was able to play the role of mediator as last month's fighting spun out of control.
"Iran, at the end of the day, clearly played a role as an arbiter, if you will, for talks among all of the different parties," Petraeus told the Senate Armed Services Committee.
Such clout concerns some U.S. officials, who have argued that it illustrates Iran's ability to control levels of fighting even as the U.S. struggles for influence with the same groups.
But not all U.S. officials agree that Iran's role was pivotal. One defense official, who like several others spoke on condition of anonymity when discussing intelligence assessments, contended that although Iran was involved in talks between the Maliki government and fighters loyal to Sadr's Mahdi Army militia, it in no way directed the actions of either side.
"Anybody would be concerned if we thought the Iranians were truly calling the shots on the Shia militias," said a senior military officer who had seen U.S. intelligence on the fighting. "I don't think they were calling the shots."
Trita Parsi, an Iranian expert at Johns Hopkins University's School of Advanced International Studies, said the U.S. appeared to be overplaying Iranian links to justify high troop levels.
"I don't think this is all about Iran," Parsi said. "Crocker, in my view, is trying to portray this in such a way that . . . if we don't [stay], we'll be abandoning Maliki and giving him to Iran. It's not really working like that."
Also in dispute is the extent of Iran's ties to Sadr. Some analysts have argued that the influential cleric's repeated visits to Iran, and the fact that he did not return to Iraq during last month's fighting, is evidence that he has become co-opted by radical elements in Iran.
Such a view is controversial within the Pentagon, where Sadr has been viewed increasingly as an independent political player who potentially can be neutralized if co-opted by the U.S.
One American officer based in Baghdad said the military leadership there had been in regular contact with Sadr's political organization.
And several Pentagon officials said they thought the cleric remained a free agent who was being courted simultaneously by Maliki, Tehran and Washington.