The US has carried out air strikes against a pro-Iran militant group in Iraq, killing 19 fighters, two days after a rocket attack that killed an American civilian contractor.

The Pentagon said on Sunday it targeted weapons caches or command and control facilities linked to Kata'ib Hezbollah (KH) in Western Iraq, as well as Eastern Syria, in response to a barrage of 30 or more rockets fired on Friday.

Secretary of State Mike Pompeo said "we will not stand for the Islamic Republic of Iran to take actions that put American men and women in jeopardy".

Four US service members and Iraqi security forces were also wounded in Friday's attack at the K1 Iraqi military base in Kirkuk, an oil-rich region north of Baghdad.

US Defense Secretary Mark Esper said on Sunday the air strikes were successful, and he did not rule out further action to "deter further bad behavior from militia groups or from Iran".

Esper also said that he and Pompeo had travelled to Florida, where President Donald Trump has been spending the Christmas holidays, to brief him on the latest Middle East events.

A picture taken on May 31, 2019 shows Iraqi Shiite fighters from the Iran-backed armed group, Hezbollah brigades take part in a military parade to mark the pro-Palestinian Al-Quds (Jerusalem) Day in Baghdad
A picture taken on May 31, 2019 shows Iraqi Shiite fighters from the Iran-backed armed group, Hezbollah brigades take part in a military parade to mark the pro-Palestinian Al-Quds (Jerusalem) Day in Baghdad AFP / AHMAD AL-RUBAYE

"KH has a strong linkage with Iran's Quds Force and has repeatedly received lethal aid and other support from Iran that it has used to attack" coalition forces, the Pentagon said earlier, referring to the external arm of Iran's Revolutionary Guards.

Nineteen fighters were killed by the US strikes in western Iraq, while several were wounded, according to an official from the Tehran-backed Hashed al-Shaabi paramilitary force.

A few hours later, four rockets exploded near a base housing US troops close to Iraq's capital without wounding anyone, an Iraqi security official told AFP.

The military spokesman for Iraq's outgoing prime minister Abel Abdel Mahdi decried "a violation of Iraqi sovereignty".

Another powerful pro-Iran faction, Assaib Ahl al-Haq -- whose leaders were recently hit with US sanctions -- called for Americans to withdraw from Iraq.

"The American military presence has become a burden for the Iraqi state and a source of threat against our forces," it said in a statement.

A plethora of Iran backed armed groups in Iraq, against a backdrop of heightened tensions between Tehran and Washington, have made it increasingly difficult for Baghdad to balance the demands of these key allies
A plethora of Iran backed armed groups in Iraq, against a backdrop of heightened tensions between Tehran and Washington, have made it increasingly difficult for Baghdad to balance the demands of these key allies AFP / AHMAD AL-RUBAYE

"It is therefore imperative for all of us to do everything to expel them by all legitimate means."

US-Iran tensions have soared since Washington pulled out of a landmark nuclear agreement with Tehran last year and imposed crippling sanctions.

Baghdad -- which is close to both countries -- risks being caught in the middle.

In Iraq's neighbour Syria, Shiite powerhouse Iran backs the government of President Bashar al-Assad in an eight-year civil war.

Friday's attack on the K1 base in Kirkuk involved a direct hit on an ammunition depot caused secondary explosions, and four more rockets were found in their tubes in a truck at the launch point, according to a US official who spoke on condition of anonymity.

Federal security forces, Shiite militia units and IS sleeper cells all have a presence in Kirkuk province, which is claimed by both Iraq's autonomous Kurdistan Region and federal authorities.

Friday's attack and the US retaliation come as Iraq is gripped by its biggest anti-government street protests since the US-led invasion of 2003 that toppled dictator Saddam Hussein.

Protesters, many of whom grew up in the post-Saddam era, have vented their anger at a government they consider inept, corrupt and beholden to Iran.

Protest related violence has claimed about 460 lives, most of them demonstrators, and left some 25,000 people wounded, but rallies and sit-ins have continued.

Since October 28, at least 11 attacks have targeted Iraqi military bases where US soldiers or diplomats are deployed, including five rockets that hit Al-Asad air base on December 3, just four days after US Vice President Mike Pence visited troops there.

A US source has said pro-Iran factions in Iraq are now considered a more significant threat to American soldiers than IS, whose sweeping offensive in 2014 saw Washington deploy thousands of troops to the country.