A senior US senator has questioned President Donald Trump's troop withdrawal announcement from Syria after four Americans were killed in a suicide attack by the armed group ISIL.

Republican Lindsay Graham, a Trump ally, blamed Wednesday's attack in the northern Syrian city of Manbij on the president's decision to quickly pull US forces out of the war-torn country.

The withdrawal move "set in motion enthusiasm by the enemy we're fighting", said Graham, referring to the Islamic State of Iraq and the Levant (ISIL, also known as ISIS).

"My concern about the statements made by President Trump … is we've made people we're trying to help wonder about us. And as they [ISIL] gets bolder, the people we're trying to help get more uncertain. I saw this in Iraq and I'm now seeing it in Syria," the senator said.

"We're never going to be safe here unless we're willing to help people over there who will stand up against radical ideology," Graham added.

At least 19 people, including Syrian civilians and US troops, were killed after a blast struck near a US-led coalition patrol, less than a month after Trump announced the withdrawal.

Two US soldiers, one Pentagon civilian, and one contractor were killed in the attack.

The attack called into question Trump's claim that ISIL has been defeated in Syria - his stated reason for pulling 2,000 US troops from the country.

US Vice President Mike Pence repeated the claim on Wednesday after the attack, saying the ISIL "caliphate has crumbled" and the armed group "has been defeated".

Later in the day, he issued a statement, saying that he and Trump "condemn the terrorist attack ... and our hearts are with the loved ones of the fallen".

"As we begin to bring our troops home, the American people can be assured, for the sake of our soldiers, their families, and our nation, we will never allow the remnants of ISIS to reestablish their evil and murderous caliphate - not now, not ever," said Pence.

Turkey's President Recep Tayyip Erdogan weighed in on the controversy, saying he didn't expect the attack to affect Trump's pullout decision.

The American forces stationed in Manbij work closely with the Kurdish YPG militia that controls areas of northern Syria near Turkey's border.

Ankara considers the US-backed YPG to be a "terrorist" group and has threatened to invade the region to scatter the militia.

Tensions have risen between the NATO allies, Turkey and the US, as Trump has demanded that any American troop withdrawal must be accompanied by a pledge from Ankara not to target its YPG allies.

Security Analyst Yusuf Alabarda told Al Jazeera the ISIL attack targetting US forces was likely in response to the American troop withdrawal announcement. He noted the heads of the US and Turkish militaries met on Wednesday in Brussels to organise a security zone in northern Syria after the withdrawal.

"It was very bad timing since for two years there hasn't been a suicide attack in the Manbij area. Turkish officials and the Trump administration are very decisive on the troop withdrawal. Both countries' leadership won't be manipulated by such kinds of attacks inside Syria," Alabarda said.

"These areas - after the turmoil and chaos since the war started - is a safe haven for all kinds of terrorist activities. Any kind of intelligence agency that tries to manipulate the United States' decision can create chaos in such style," he added.

No timetable for withdrawal

Trump's withdrawal announcement last month surprised many politicians in Washington as well as Western and Kurdish allies fighting alongside the US against ISIL.

The move prompted US Secretary of Defense James Mattis to resign, and the top US envoy in the anti-ISIL fight, Brett McGurk, to leave his post earlier than expected.

Trump's decision was initially expected to be carried out swiftly, but the timetable became vague in the weeks following his announcement.

Last week, the US military began pulling out equipment from the northeast into neighbouring Iraq. No troops are known to have withdrawn yet.