A pair of rockets hit an Iraqi base hosting U.S.-led coalition and NATO troops, Iraq's military said Tuesday. This is the third attack on installations hosting foreign forces within a week.

The rockets slammed into the Besmaya base south of Baghdad late Monday night, a statement by the military said, making no mention of casualties.

Spanish forces linked to the U.S.-led coalition fighting the Daesh terrorist group, as well as NATO training forces, are present in Besmaya.

U.S. Secretary of State Mike Pompeo warned Iraq Monday that the U.S. would retaliate "as necessary" against any new assaults on Americans after a slew of rocket attacks.

The U.S. last week launched airstrikes against an Iranian-allied paramilitary group following a deadly attack on an Iraqi base housing U.S. troops, but rocket fire has continued unabated.

In a phone call with Iraq's caretaker prime minister, Adel Abdel-Mahdi, Pompeo said that Baghdad "must defend coalition personnel" who are officially deployed as part of the campaign against the Daesh terrorist group.

"Secretary Pompeo noted that America will not tolerate attacks and threats to American lives and will take additional action as necessary in self-defense," the State Department said in a statement.

A fresh spate of rockets, brazenly fired in the daytime, targeted the crowded Taji air base north of Baghdad last Saturday, wounding three members of the U.S.-led coalition.

None of the attacks have ever been claimed but the U.S. has blamed hardline Iran-backed paramilitary groups.

Last Wednesday, a similar rocket attack at Taji killed two American personnel and a British soldier in the deadliest such incident at an Iraqi base in years. The U.S. responded Friday with airstrikes on arms depots it said were used by the faction Kataeb Hezbollah and destroyed part of the under-construction airport in the Shiite shrine city of Karbala. Iraq's military said that five members of its security forces and one civilian were killed, none of whom were members of the targeted paramilitary group.

Iraq, which has long feared getting caught in spiraling U.S.-Iran tensions, denounced the "American aggression" and said it would lodge a complaint with the U.N. Security Council.

The conflict dramatically escalated in early January when the U.S. killed Iran's best-known general, Qassem Soleimani, in a drone strike at the Baghdad airport.

Baghdad responded by urging U.S. forces to leave but Washington has refused, with Pompeo saying that Iraqi leaders privately wanted troops to stay and President Donald Trump threatening sanctions if U.S. forces are booted out.