A US contractor died of cardiac failure after rocket fire hit an Iraqi base hosting coalition troops Wednesday, the Pentagon said, just two days ahead of Pope Francis's visit to the country.

Around 10 rockets slammed into the sprawling Ain al-Assad military base in Iraq's western desert after several weeks of escalating US-Iran tensions on Iraqi soil.

No US service members were injured, but the civilian contractor suffered a cardiac episode while sheltering and died shortly after, the US Defense Department said.

Pope Francis said he would go ahead with the first-ever papal visit to the war-scarred country so as not to "disappoint" the Iraqi people.

There has been a flurry of rocket attacks in the past three weeks on Iraqi bases used by US-led coalition troops, including this one in the Kurdish regional capital Arabil last month
There has been a flurry of rocket attacks in the past three weeks on Iraqi bases used by US-led coalition troops, including this one in the Kurdish regional capital Arabil last month KURDISTAN 24 CHANNEL / -

"The day after tomorrow, God willing, I will go to Iraq for a three-day pilgrimage," the 84-year-old pontiff said in his Wednesday address. "For a long time I have wanted to meet these people who have suffered so much."

The rocket attack was the fourth in recent weeks targeting locations where US forces operate.

It came five days after the US retaliated, bombing a border depot in Syria which the Pentagon said was used by Iran-backed Iraqi armed militia that have been tied to the rocket attacks.

Ain al-Assad hosts Iraqi forces and US-led coalition troops helping fight the Islamic State group.

The Ain al-Assad base in western Iraq was the target of an Iranian missile attack in January last year carried out in retaliation for the US killing of top general Qasem Soleimani in a drone strike in Baghdad
The Ain al-Assad base in western Iraq was the target of an Iranian missile attack in January last year carried out in retaliation for the US killing of top general Qasem Soleimani in a drone strike in Baghdad AFP / Ayman HENNA

The coalition's spokesman said the rocket barrage came at 7:20 am (0420 GMT). Iraqi security forces said they had found the platform from which the rockets were fired.

Western security sources told AFP they were Iranian-made Arash 122mm artillery rockets, heavier than those seen in similar attacks.

Despite boiling Iran-US tensions in Iraq, Pope Francis seems determined to go ahead on Friday with a first-ever papal visit
Despite boiling Iran-US tensions in Iraq, Pope Francis seems determined to go ahead on Friday with a first-ever papal visit AFP / AHMAD AL-RUBAYE

The US contractor's death marked the third fatality in recent rocket strikes, after an attack targeting US-led troops in the Kurdish regional capital of Arbil left two people dead.

On Wednesday, Arbil's counter-terror service said its investigation found members of the Hashed al-Shaabi, an Iraqi state-sponsored security force, were involved in that attack.

The Hashed includes hardline pro-Iran factions accused by both US and Iraqi officials of conducting previous rocket attacks on Western interests.

The attacks are typically claimed by shadowy groups that officials say were established to deflect blame from the real perpetrators.

One of these "front groups" claimed responsibility for the Arbil rockets, but Arbil's counter-terror service published a "confession" by a man it said was one of four people involved and who implicated the Hashed.

Iraqi security forces patrol around the Cathedral of Saint Joseph during preparations for the Pope's visit in Iraq's capital Baghdad
Iraqi security forces patrol around the Cathedral of Saint Joseph during preparations for the Pope's visit in Iraq's capital Baghdad AFP / Sabah ARAR

Analysts say hardline factions want to ramp up pressure on Prime Minister Mustafa al-Kadhemi following his pledges to rein in rogue militias.

Kadhemi tweeted after Wednesday's attack that "any party that thinks it is above the state or can impose its agenda on Iraq and the future of its people is delusional".

Observers also say the rockets may be Tehran's way of pressuring Washington, which under President Joe Biden is offering to revive the Iran nuclear deal abandoned by his predecessor Donald Trump in 2018.

Asked about a US reaction, Biden said: "We're identifying who's responsible and will make judgements from that point."

Pentagon spokesman John Kirby said the Iraqis would investigate the attack, and that the United States would not shy away from retaliating if that is needed.

"Nobody wants to see this situation escalate," Kirby told reporters.

Referring to Friday's US bombing, he added: "I said back then that we hope it will have a deterrent effect. We still do."

Tensions between the two arch-rivals peaked in January 2020 after a US drone strike on Baghdad killed Iranian general Qasem Soleimani and top Iraqi paramilitary commander Abu Mahdi al-Muhandis.

In response, Iran launched ballistic missiles on Ain al-Assad and Arbil, wounding dozens.

Over the next 10 months, dozens of rockets and roadside bombs targeted Western security, military and diplomatic sites across Iraq -- some of them deadly.

The attacks came to a near-complete halt in October following a truce with the hardliners, but they have resumed over the past three weeks.

Despite the attack and the Covid-19 pandemic, Pope Francis said he would go ahead with his visit, which includes a meeting with top Shiite cleric Grand Ayatollah Ali Sistani.

"The Iraqi people are waiting for us, they were waiting for Saint John Paul II, who was forbidden to go," said the pontiff.

"One cannot disappoint a people for the second time. Let us pray that this journey will be successful."

To control the crowds during the pope's visit, Iraq is set to extend weekend lockdowns to cover the entire papal visit from March 5-8.