US soldiers have been killed in an apparent suicide bombing in northern Syria claimed by the Islamic State (IS) group, the US military has said.
IS said a militant had detonated an explosive vest next to a US patrol in the Kurdish-held town of Manbij.
Two US soldiers, a civilian employee at the defence department and a contractor died, US Central Command said. Another three US soldiers were wounded.
US forces are in Manbij to back Kurdish and Arab forces.
IS fighters have been driven out of almost all of eastern Syria.
Wednesday's attack took place at a restaurant near Manbij's main market.
The US troops were at the restaurant to meet members of the Manbij Military Council, a witness told Reuters news agency.
CCTV footage from a nearby shop shows a large fireball engulfing several people standing on the street outside.
The US soldiers were subsequently evacuated by a helicopter that landed on a playground, the Syrian Kurdish Hawar News Agency reports.
It cited the head of Manbij's health committee as saying that 18 people had been killed, including the US soldiers, and that another 18 had been wounded.
US Central Command later confirmed that four Americans were killed.
"Two US service members, one department of defence (DoD) civilian and one contractor supporting DoD were killed and three service members were injured while conducting a local engagement in Manbij," it said in a statement.
Last month, President Donald Trump announced that the US would begin pulling out all its 2,000 troops from Syria because IS had been "defeated".
Opponents of the withdrawal stressed that although IS now controlled only 1% of the territory they overran five years ago, the group had not disappeared entirely.
Republican Senator Lindsey Graham, who has previously criticised Mr Trump's decision to withdraw troops from Syria, said on Wednesday that the move could encourage IS attacks and "set in motion enthusiasm by the enemy we're fighting".
Later, US Vice-President Mike Pence said he and President Trump condemned the attack in Syria but reiterated that the withdrawal plan would continue.
"We have crushed the [IS] caliphate and devastated its capabilities. As we begin to bring our troops home... we will never allow the remnants of [IS] to re-establish their evil and murderous caliphate."
A recent US report said there were still as many as 14,000 IS militants in Syria and even more in neighbouring Iraq - and that they were expected to shift to guerrilla tactics in an attempt to rebuild their network.
Syrian Kurds also fear that Manbij and other towns they control near the border with Turkey might come under attack by the Turkish military, which wants to clear them of the Kurdish People's Protection Units (YPG) militia.
The Turkish government considers the YPG an extension of the banned Kurdistan Workers' Party (PKK), which has fought for Kurdish autonomy in Turkey for three decades. However, it denies any direct organisational links to the group.