The United States is considering quickly closing its embassy in Baghdad after a series of rocket attacks on Iraq's Green Zone by Iranian-backed militias, two sources familiar with the discussions told Axios on Wednesday.

The move, among several options being considered, could be a prelude to retaliation against Iran, according to the report.

Rocket attacks have regularly targeted Iraqi bases as well as the fortified Green Zone in Baghdad, where the US embassy is located, since the elimination in January of top Iranian General Qassem Soleimani.

The last such attack took place on Sunday, when defensive interceptors stationed at the embassy shot down three rockets fired into the Green Zone.

The US withdrew some staff from its embassy in Baghdad earlier this month, temporarily reducing personnel ahead of the first anniversary of the air strike that killed Soleimani outside Baghdad's airport on January 3.

On Wednesday, Trump blamed Iran for Sunday’s attack on the US Embassy and warned the Islamic Republic against further attacks on American interests.

“Some friendly health advice to Iran: If one American is killed, I will hold Iran responsible. Think it over,” he tweeted.

The head of US forces in the Middle East said earlier this week that Washington is "prepared to react" if Tehran launches an attack to mark the first anniversary of Soleimani’s death.