The retaliation was the first time Iran directly targeted a US installation with ballistic missiles
A total of 22 missiles struck two bases housing US troops in Iraq but there were no Iraqi casualties, the military in Baghdad said Wednesday after the overnight attack.
The statement made no mention of Iran, which claimed that it had fired ballistic missiles at the Ain al-Asad airbase in retaliation for the US killing of a top Iranian general.
"Between 1:45 am and 2:15 am (2245 GMT and 2315 GMT) Iraq was hit by 22 missiles, 17 on the Ain al-Asad air base and ... five on the city of Erbil," the Iraqi military said.
"There were no victims among the Iraqi forces," it added, but did not mention whether or not there were casualties among foreign troops.
Ain al-Asad is the largest airbase where US-led coalition troops are based.
Erbil is the capital of the Kurdish region, and a top official from the regional government said no American military base or US consulate was hit there.
The official also said there were no casualties in Erbil.
President Donald Trump on Tuesday took to Twitter following the strike to say an "assessment of casualties & damages taking place now".
"So far, so good!" he wrote.
It was the first time Iran directly targeted a US installation with ballistic missiles.
Over the last two months, US troops and even the embassy in Baghdad had been targeted in more than a dozen rocket attacks that Washington blamed on pro-Tehran groups, but none had been claimed.