A suicide attack claimed by Isis has killed two US soldiers, and two other Americans working with the US-led coalition in northern Syria.

The Pentagon said a Defense Department civilian and a contractor lost their lives in the attack, along with the soldiers, which also killed more than a dozen civilians.

The blast hit a busy restaurant in the centre of Manbij, a strategically important city which is regularly patrolled by the US-led coalition. Three US soldiers were also wounded.

Isis claimed responsibility for the attack within an hour, saying the perpetrator had used an explosive vest. A spokesperson for the US-led coalition said in a statement US service members “were killed during an explosion while conducting a routine patrol in Syria today”, without giving further details.

The attack represents the worst single loss of life for the US military in Syria since it first sent forces to fight Isis in 2015. A total of eight US service members have lost their lives fighting in the country.

The news of the deaths comes just weeks after US president Donald Trump declared that the terror group was defeated in Syria, and that the 2,000 US troops stationed in the country would be leaving.

“We have defeated Isis in Syria, my only reason for being there during the Trump presidency,” the president wrote on Twitter on 19 December.

Footage of the explosion shared on social media appears to show that it was detonated in a crowd, on a busy street. Another video showed a US helicopter evacuating wounded from the site of the attack.

Lebanon storm hits Syrian refugee camps – in pictures Show all 15 1 /15 Lebanon storm hits Syrian refugee camps – in pictures Lebanon storm hits Syrian refugee camps – in pictures Khaled Alawi stands with his daughters in front of his home in an informal settlement for Syrian refugees in Akkar, northern Lebanon Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures A Syrian refugee child looks from his makeshift shelter at Qab Elias Syrian refugee camp in the Bekaa valley EPA Lebanon storm hits Syrian refugee camps – in pictures Children play in front of a shelter in Akkar Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures Syrian refugees Jose Ahmad al-Jessi, a mother of eight in her 50s, and her daughter Raghad, stand in the doorway of a shop warehouse, where they fled to when their tent flooded on Tuesday Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures Khaled Alawi surveys the damage to his shelter in Akkar Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures Syrian refugees sit inside their makeshift shelter in the Bekaa valley EPA Lebanon storm hits Syrian refugee camps – in pictures A young boy stands in front of his shelter in Akkar Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures A Syrian refugee child plays with snow outside their makeshift shelter in the Bekaa valley EPA Lebanon storm hits Syrian refugee camps – in pictures Richard Hall Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures A Syrian refugee shovels mud in front of a makeshift shelter follwoing rain storms in the Bekaa valley AFP/Getty Images Lebanon storm hits Syrian refugee camps – in pictures A shelter in Akkar Richard Hall/The Independent Lebanon storm hits Syrian refugee camps – in pictures Syrian refugee children play with snow outside their makeshift shelter in the Bekaa valley EPA Lebanon storm hits Syrian refugee camps – in pictures A Syrian refugee family pumps water after heavy rain in the Bekaa Valley AP Lebanon storm hits Syrian refugee camps – in pictures Syrian refugee children play outside their family tents after a heavy rain at a refugee camp in the town of Bar Elias, in Lebanon's Bekaa Valley AP Lebanon storm hits Syrian refugee camps – in pictures A flooded road leads to an informal settlement for Syrian refugees in Akkar Richard Hall/The Independent

White House press secretary Sarah Sanders said that the president had been “fully briefed” and was following developments.

“Our deepest sympathies and love go out to the families of the brave American heroes who were killed today in Syria,” Ms Sanders added in a later statement.

“We also pray for the soldiers who were wounded in the attack. Our service members and their families have all sacrificed so much for our country”.

Mr Trump’s abrupt withdrawal announcement last month caught officials within his own administration off-guard, and led to the resignation of defence secretary Jim Mattis.

Critics of the pullout argued that leaving so quickly could damage the fight against Isis, which was not yet over, and leave Washington’s Kurdish allies vulnerable to attack from Turkey.

Commenting on the attack on Wednesday, Republican senator Lindsay Graham said the withdrawal announcement had “set in motion enthusiasm by the enemy we’re fighting”.

Video shows wreckage at scene after suicide bomb hits busy restaurant in centre of Manbij

“I hope the president would look long and hard about what we’re doing in Syria,” he added.

However, vice president Mike Pence said that while he and Mr Trump condemned the attack, the US would continue with its plan to withdraw troops from the country.

“Thanks to the courage of our armed forces, we have crushed the Isis caliphate and devastated its capabilities. As we begin to bring our troops home ... We will never allow the remnants of Isis to re-establish their evil and murderous caliphate,” Mr Pence said in a statement.

Manbij, where Wednesday’s attack took place, has been at the centre of a power struggle between those Kurdish allies and Turkey. The city is controlled by fighters linked to the Syrian Democratic Forces – a Kurdish-led militia that has fought alongside the US against Isis.