US President Joe Biden ordered strikes on two facilities in Syria following attacks on US troops in the past week, the Pentagon said, warning the US will take additional measures if attacks by Iran's proxies continue.
US forces have been hit more than a dozen times in Iraq and Syria in the past week by what Washington suspects are Iran-backed groups.
Iranian Foreign Minister Hossein Amirabdollahian said at the United Nations on Thursday that if Israel's offensive against Hamas did not stop, the United States will "not be spared from this fire".
The US military on Thursday carried out strikes against two facilities in eastern Syria used by Iran's Revolutionary Guard Corps and groups it backs, the Pentagon said.
"These precision self-defence strikes are a response to a series of ongoing and mostly unsuccessful attacks against US personnel in Iraq and Syria by Iranian-backed militia groups that began on October 17," US Defense Secretary Lloyd Austin said in a statement.
Biden has sent a rare message to Iranian Supreme Leader Ayatollah Ali Khamenei warning Tehran against targeting US personnel in the Middle East, the White House said earlier on Thursday.
Israel said on Friday military raids into Gaza were preparing "the next stage of the operation", amid fears that a ground invasion of the Palestinian enclave could spark a wider Middle East conflict.
Governments in the West and the Middle East are concerned about a wider regional conflict developing if Israel continues its bombardment of Gaza or mounts a ground invasion in response to the surprise attack by Hamas.
Israel and Lebanon-based Hezbollah have already exchanged fire and Israel has targeted Syrian army infrastructure and airports.
The United States has sent warships and fighter aircraft to the region over the last three weeks. On Thursday the Pentagon said about 900 more US troops have arrived in the Middle East or are heading there to bolster air defences for US personnel.