The US has carried out air strikes against two weapons and ammunition storage facilities in eastern Syria used by Iran's Revolutionary Guards.
Secretary of Defense Lloyd Austin said the strikes were in response to recent attacks on US bases in Iraq and Syria by Iranian-backed militia groups.
The US strikes were "separate and distinct from the ongoing conflict between Israel and Hamas," he said in a statement.
Iran did not immediately comment.
The strikes, carried out by a pair of F-16 US air force fighters, took place on Friday at around 04:30 local time (01:30 GMT) near Abu Kamal, a town on the border with Iraq.
It is not yet known if there were any casualties from the attacks.
"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," Mr Austin said in a statement.
US and coalition troops have been attacked at least 12 times in Iraq and four times in Syria since the conflict between Israel and Hamas began.
A total of 21 US military personnel have suffered minor injuries, according to the Pentagon.
American officials attribute the attacks to Iranian proxy groups operating in the region. Iran backs both Hamas, which controls Gaza, and Hezbollah, which operates in Lebanon, with arms as well as money.
"These Iranian-backed attacks against US forces are unacceptable and must stop," Mr Austin said.
"If attacks by Iran's proxies against US forces continue, we will not hesitate to take further necessary measures to protect our people."
In normal times, these air strikes would not be that remarkable.
But with a war raging in the Gaza Strip and fears of an escalation into a regional conflict there is an underlying worry that Iran and its proxies could soon get involved in the fight between Israel and Hamas, sparking a wider and even more serious war.
The White House said on Thursday that President Joe Biden had warned Iran against targeting US personnel in the Middle East via a rare message to Iran's Supreme Leader Ayatollah Ali Khamenei.
At a UN General Assembly meeting in New York also on Thursday, Iran's Foreign Minister Hossein Amirabdollahian warned that Washington would not be spared from the fire engulfing the region if the violence in Gaza continued.
The US has sent warships and fighter aircraft to the region in recent weeks. On Thursday, US officials said some 900 US troops were also being moved there.
The US is at great pains to emphasise that the overnight action in eastern Syria is not connected to what is going on in Gaza, that it was not done in any coordination with Israel, and that it is a completely separate action of self-defence.
It is trying to distance its action and tell Iran to back off.
Despite this, it will be seen as connected and part of US actions in the region that are seen as supportive of Israel.