Two US soldiers and a US civilian interpreter have been killed in Syria in an ambush by an Islamic State (IS) gunman, the US Central Command (Centcom) has said.

Officials said three other service members were injured in the attack, during which the gunman was engaged and killed. Syria's state news said two Syrian service personnel were also injured.

US President Donald Trump wrote on social media that it was an ISIS attack against the US and Syria and said there would be a very serious retaliation. The Syrian government has issued a statement condemning the attack.

The identities of those killed are being withheld for 24 hours until their next of kin have been informed, Centcom said.

In a post on X, Centcom, which directs American military operations in Europe, Africa, and the Indo-Pacific, said the attack was the result of an ambush by a lone ISIS gunman, while a Pentagon official said initial assessments showed the attack was likely to be carried out by the Islamic State group.

The UK-based Syrian Observatory for Human Rights said the attacker was a member of the Syrian security force.

No group has claimed responsibility for the attack, and the identity of the gunman has not been released.

The ambush occurred in Palmyra, located in the centre of the country, while the soldiers were conducting a key leader engagement, according to Pentagon spokesperson Sean Parnell.

A Pentagon official said: This attack took place in an area where the Syrian president does not have control.

Trump added that the three injured US soldiers were doing well.

US Defence Secretary Pete Hegseth said: Let it be known, if you target Americans - anywhere in the world you will spend the rest of your brief, anxious life knowing the United States will hunt you, find you, and ruthlessly kill you.

In a post on X, Syria's Foreign Minister Asaad al-Shaibani said the country condemned the attack and extended its condolences to the families of the victims.

US troops have maintained a presence in Syria since 2015 to help train other forces as part of a campaign against IS.