But how is the U.S. so sure that the weapons and training are coming from Iran?

“We have a very comprehensive understanding of where the rockets are manufactured,” Maj. Gen. Jeffrey S. Buchanan, chief spokesman for the U.S. military in Iraq, said in an interview. “We can identify what factory they were made in by certain markings. We’ve seen markings recently of rockets that were manufactured in Iran in 2010. These are not things that were just buried in old cache sites. They continue to come across the border in very large numbers.”

U.S. officials say three Shiite militia groups — the Promised Day Brigade, Asaib Ahl al-Haq and Kataib Hezbollah — are responsible for the deaths of at least 18 U.S. troops in the past seven weeks. The groups have been trained and supplied by Iranian Revolutionary Guard special forces, who U.S. officials say are crossing the border into Iraq to provide training and materiel.

Singling out the Kataib Hezbollah, Buchanan said: “We get fingerprints off of a certain cache or a certain rocket that we can tie biometrically to an individual who lives in Iran, he’s a top leader of Kataib Hezbollah, he lives in Iran, he is trained by the Quds Force. All of that together is a very compelling set of evidence.”

American military and diplomatic officials continue pushing the Iraqis to more aggressively target the insurgent groups, Buchanan said, noting that more Iraqis than Americans have been injured or killed in recent attacks.

“This should be a choice about what’s good for Iraq,” Buchanan said. “They don’t have to choose between the relationship between them and the United States and between them and Iran. They should have positive relations with both. But in order to bring that about, it’s going to require some changes in behavior at least, if not attitudes, on the Iraqi side.”

As for Panetta, his comments on potential self-defense angered some Iraqi lawmakers, who suggested any military action against the Iranians inside Iraq would violate the three-year U.S.-Iraq security agreement that expires in December. Making use of his tart tongue, Panetta also said that Iraqi leaders need to “dammit, make a decision” on whether they want U.S. troops to stay beyond December.

But Buchanan said he hasn’t picked up on any lingering ill will among Iraqi military leaders following Panetta’s visit this week.

“I haven’t talked to any Iraqis that have said anything negative about the visit. I do meet with some. We talked about the substance of what was said, but that was it,” he said.