Three rockets, apparently fired by an Iranian-backed Iraqi militia, landed in the U.S. Embassy complex within Baghdad’s fortified Green Zone late Tuesday, amid rising tensions with Iran in the waning days of the Trump administration.

A U.S. military official, speaking on the condition of anonymity in advance of a formal statement, said initial reports indicated there had been no injuries to U.S. personnel or damage to American facilities. Another rocket reportedly landed elsewhere in the zone, and the Iraqi army said in a statement that another three fell outside the area, killing a young child and wounding five Iraqi civilians.

The attack came as President Trump has consulted with top members of his national security team about a possible strike on Iran following reports of a sharp expansion in its uranium enrichment program. The government in Tehran has said it has no intention of building a nuclear weapon.

In a meeting Thursday, advisers cautioned against a preemptive strike, according to a senior U.S. official who spoke on the condition of anonymity because of the sensitivity of the matter. Since his legacy is to have pulled the United States out of regional wars, Trump was advised he should resist starting a new conflict in a region where he has ordered U.S. troop withdrawals.

Trump agreed, the official said. “No orders have been given. . . . There’s no imminent threat of preemptive strikes against Iran for their nuclear or missile programs,” the official said.

But the president emphasized that any killing of an American that could be “tied back to instructions from Iran” would spark an immediate U.S. response, the official said. The president was “extraordinarily forceful,” the official said. If the Iranians kill Americans, the U.S. response will be swift and painful, the official said.

Responding to accounts of the White House meeting, first reported by the New York Times, an Iranian government spokesman said Tuesday that any U.S. attack on Iran would bring a “crushing” response.

Spokesman Ali Rabiei, streaming on an official government website, said that it was unlikely that the United States “would want to cause insecurity in the world and the region.”

The attack came less than an hour after acting defense secretary Christopher C. Miller announced that the U.S. military would withdraw another 500 troops from Iraq, decreasing the number to 2,500 by Jan. 15, days before President-elect Joe Biden takes office.

In remarks to reporters outside the White House, national security adviser Robert C. O’Brien said the remaining U.S. forces in both Iraq and Afghanistan — where the number is also coming down to 2,500 — would “defend our embassies and the other agencies of the U.S. government.” “By May,” he said, “it is President Trump’s hope that they will all come home safely and in their entirety.”

Beyond Trump’s desire to fulfill his campaign promise to end foreign wars before his term expires, it is unclear why troops are being brought home at a time of particular tension in the Middle East.

In recent days, U.S. intelligence has been monitoring potential threats by Iran to U.S. forces in the region, people familiar with the matter said, speaking on the condition of anonymity to discuss sensitive information. Current and former officials have expressed alarm that Iran might try to provoke military conflict in Trump’s final days in office.

Biden was briefed Tuesday on global threats, presumably including Iran, by national security experts, including former diplomats and military officials. But he continued to be denied official briefings from current intelligence and defense officials as Trump refused to allow his administration to formally begin the transition process.

“We are going to focus on readiness for whatever may come,” Biden, in Wilmington, Del., told the group of experts as the virtual meeting began, “and that’s why I have asked you all to brief me on what you see as the biggest challenges we face and how to make sure that our diplomacy, our military” is prepared “to meet these crises.”

“You know that I’ve been unable to get the briefings that ordinarily would have come by now,” he said. “And so I just want to get your input on what you see ahead. And, to state the obvious, there’s no presidential responsibility more important than protecting the American people.”

Briefers at the session included retired Gen. Lloyd Austin, former commander of U.S. forces in Iraq and of the U.S. Central Command during the Obama administration; retired Gen. Stanley McChrystal and retired Adm. William McRaven, both of whom served as head of the Joint Special Operations Command; former deputy CIA directors Avril Haines and David Cohen; and a number of other former senior diplomats and defense officials.

Biden also spoke by telephone Tuesday with Israeli Prime Minister Benjamin Netanyahu, whose government has opposed the president-elect’s plans to try to reengage diplomatically with Iran. Biden has said he will consider reentering the Iran nuclear deal that Trump exited in 2018, provided Tehran returns to compliance with its terms, including strict limits on enriched uranium.

Trump’s secretary of state, Mike Pompeo, is due to visit Israel this week.

In Iraq, the rocket attack appeared to mark the end of a unilateral truce declared in October by Iranian-backed militias operating there.

Since late 2019, the armed groups have repeatedly targeted facilities and personnel linked to Western interests in Iraq. Those previous attacks resulted in the deaths of six Iraqis, three U.S. servicemen and one Briton, and brought the United States and Iran to the brink of war.

A Telegram channel linked to the militias said Tuesday that the Ashab al-Kahf group had fired six rockets into the area in Baghdad. Another post showed the face of Abu Mahdi al-Muhandis, the Iraqi militia leader killed alongside Iranian military leader Qasem Soleimani in a Jan. 3 drone strike ordered by Trump.

The administration has also threatened to withdraw all personnel from the U.S. Embassy in Baghdad, citing security concerns, a move that critics say would only deepen Iranian influence in Iraq.

Loveluck reported from Baghdad. Anne Gearan in Wilmington and Missy Ryan and Shane Harris in Washington contributed to this report.