Former CIA Station Chief Dan Hoffman reacted to a crowd of angry Iraqis storming the U.S. Embassy in Baghdad saying the act was carried out to try and achieve Iran’s goal of getting U.S. troops to leave Iraq.

“They [Iran] have ratcheted up the pressure with roughly 11 attacks on Iraqi bases which house U.S. contractors and U.S. service personnel over the last couple of months,” Hoffman, a Fox News contributor, noted on “America’s Newsroom” on Tuesday.

“Secretary [Mike] Pompeo very clearly warned Iran earlier this month that the United States would respond with decisive action in the event that these proxy militants continue to target our people. So I think Iran did expect this and they see it as an opportunity, a pretext, because they knew we would respond, to assemble those Iraqi militants who are just Iranian proxies to storm our embassies.”

He went on to say, “Let’s not confuse these militants outside our embassy storming the gates with the brave Iraqis who have been protesting Iraqi graft and corruption and Iranian influence. Those same so-called popular mobilization units, Kata'ib Hezbollah, have been targeting those brave Iraqis and right now, the Iraqi government is really struggling to deal with this Iranian influence in their country.”

The protesters, many of whom were reported to be wearing militia uniforms, chanted “Down, Down USA!” as they pushed their way through a main gate, prompting U.S. guards to fire tear gas in response. The demonstrators were protesting America’s recent airstrikes against an Iran-backed militia.

US EMBASSY COMPOUND IN BAGHDAD TARGETED BY MOB PROTESTING AIRSTRIKES; SIT-IN PLANNED

On Tuesday night, protesters set up tents outside the embassy in the Iraqi capital where they said they intended to stage a sit-in “until American troops leave Iraq and the embassy is closed.” About 100 Marines were sent to the embassy to bolster security and an Army Apache helicopter flew over the premises and dropped flares in a "show of force", hoping to disburse the crowd, a U.S. defense official told Fox News.

A State Department spokesperson told Fox News that "U.S. personnel are secure."

“Iraq is caught between Iran and the United States. It’s an uncomfortable place to be,” Hoffman said on Tuesday. “I’m quite sure that this attack today was not a tactical surprise for us, it’s among the highest intelligence collection priorities for us to track these proxy militants and their plans against us, but at the same time I’m sure that Iran has more in store, they want us out.”

CLICK HERE TO GET THE FOX NEWS APP

“We’ve got 5,000 troops in [the] country and that’s a threat to Iran’s efforts to influence this Iraqi government,” he continued.

Fox News’ Greg Norman and Edmund DeMarche contributed to this report.