Defense Secretary Robert M. Gates, during a meeting on Wednesday with R.O.T.C. students at Duke University, argued that a substantial American commitment to Iraq would be required to sustain progress there. In particular, he criticized Congress for cutting the State Department’s request for money he said was required for the American Embassy to take the lead in Baghdad with the end of the American combat role.

Unlike the recurring carnage carried out and claimed by Al Qaeda in Mesopotamia and other Sunni insurgent groups, the rocket attacks are a signature of Shiite extremist groups, some of them affiliated, at least loosely, with political parties now vying for political power.

They include the Promised Day Brigade, allied with the anti-American cleric Moktada al-Sadr, whose followers won 39 seats in the new 325-member Parliament and have since emerged as a potent bloc in the political negotiations.

The Sadrists have joined a still shaky alliance with other Shiite parties and Prime Minister Nuri Kamal al-Maliki’s bloc, but they oppose Mr. Maliki’s election to a second term in office. A self-imposed deadline to select a unified candidate within the alliance passed on Monday night, with leaders saying they needed more time.

“There is a political component behind indirect fire attacks,” the American military commander in Baghdad, Brig. Gen. Ralph O. Baker, said Wednesday, using the military argot for rocket or mortar attacks. “Maliki has run on a platform of improved security, and it’s conceivable that if rockets land in the international zone, then it discredits his security platform and makes him vulnerable from a political standpoint as these negotiations are occurring.”

General Baker and other commanders here blamed Iran for training and equipping the Shiite militias. In an interview on Tuesday, the chief American military spokesman, Brig. Gen. Jeffrey S. Buchanan, attributed the attacks to “at least some elements in Iran,” if not the government directly. “They’re capable of turning up the heat and turning it down,” he said.

Attacks like the recent ones have long harassed those inside the Green Zone or in the neighborhoods on the flight path. The frequency has risen and fallen, often without clear pattern, though the Green Zone seems to be a target when Vice President Joseph R. Biden Jr. visits.