American service members killed during an explosion while conducting a routine patrol in Syria

A number of U.S. service members were killed in an explosion while conducting a routine patrol in Syria on Wednesday, the U.S. military said, an attack that came less than a month after U.S. President Donald Trump announced his intention to withdraw troops from the war torn country.

The Islamic State group claimed responsibility for the rare morning attack, which local groups said killed 16 people in the U.S.-patrolled town of Manbij.

The claim, which could not be independently confirmed, calls into question Trump's claim that IS has been defeated in Syria - his stated reason for pulling 2,000 American troops out of the country.

"We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency," Trump tweeted in December in announcing his intention to bring back U.S. troops "NOW."

Trump has been clear about his desire to pull out of Syria, a country he described as "sand and death." But critics have said a pullout was premature, that IS was still not defeated and a pullout could lead to a power vacuum that would fuel even more violence.

Video released by local activists and news agencies showed a restaurant that suffered extensive damage and a street covered with debris and blood. Several cars were also damaged. Another video showed a helicopter flying over the area.

A security camera showed a busy street, and then a ball of fire and people running for cover as the blast went off.

A local town council and a Syrian war monitoring group said the blast occurred outside a restaurant near the town's main market, near a patrol of the U.S.-led coalition, killing and wounding more than a dozen people.

The Britain-based Syrian Observatory for Human Rights said 16 people were killed including nine civilians and others were wounded in the blast. It added that at least five U.S.-backed Syrian fighters were also among the dead.

The U.S. military released a statement on Twitter that said: "U.S. service members were killed during an explosion while conducting a routine patrol in Syria today. We are still gathering information and will share additional details at a later time."

The rare attack came days after the U.S. began the process of withdrawing from Syria, pulling out equipment from the northeast into neighboring Iraq. Trump's initial announcement about a rapid withdrawal took some of his closest aides by surprise, upset allies in the region, and led to the resignation of Secretary of Defense Jim Mattis.

Since then, U.S. officials and Trump himself have suggested the withdrawal would be slower than initially believed.

The Kurdish Hawar news agency, based in northern Syria, and the Observatory, which monitors the war through activists on the ground, reported U.S. troops were among the casualties.

Turkey's state-run Anadolu Agency, citing unnamed local sources, said a number of U.S. soldiers were injured in the blast and that the U.S. military evacuated soldiers by helicopter.

It was not the first time that forces of the U.S.-led coalition were subjected to attacks in the area, although they have been rare.

In March last year, a roadside bomb killed two coalition personnel, an American and a Briton, and wounded five in Manbij.