On the streets of Baghdad, many Iraqis say that if there is an armed conflict between Iran or its proxies and the United States, it is more likely to take place in the Gulf rather than on Iraqi soil. Unlike the Iraq of 2003, Iraq today is an American ally.

“I am not afraid of a war between Iran and the United States,” said Ali Selim, 55, a barber who was drying his towels outdoors. “Then the American target was Iraq. This time it’s Iran,” he said, adding that the militias would not risk their own survival by provoking American retaliation because at the end of the day they are Iraqis.

Others dismissed the increased tensions between the United States and Iran as empty saber-rattling.

“It’s just talk, just threats,” said Salim Abu Hassan, 48, a worker who had just delivered a shipment of baby scales to a medical supply store. He said he had fought in the Iran-Iraq war in the 1980s, and was in Baghdad when the United States attacked 16 years ago. “Iran and America are each one trying to shout louder than the other.”

Mr. al-Jayashi, the Iraqi security council member, also said he believed that the Iranian government did not want war. But he said he worried about the Iranian Revolutionary Guard Corps acting on its own and possibly encouraging the armed groups it has fostered in the region to act on its behalf.

It can be difficult to discern Iran’s intentions since its elected leadership and government often sound reasonable, but the Revolutionary Guards and the Quds Force, whose leader Qassem Soleimani is in regular touch with Iraqi figures, take a far more antagonistic stance toward the United States.

However, Mr. al-Jayashi and other senior Iraqi officials said Iran’s only request to Iraq has been to prevent the United States from using its soil to launch an attack on Iranian territory.