ISTANBUL — A car bomb ripped through a bus terminal in the Turkish-controlled Syrian town of al-Bab on Saturday, killing at least 10 people in an attack that highlighted the precarious security situation in Syria’s northern border areas.

Turkish military forces moved across the border last month after President Trump ordered the withdrawal of U.S. troops on bases that served as protection for Syrian Kurds, who were U.S. allies in the fight against the Islamic State.

But Turkey’s effort to create a border zone has left it facing potential backlash from militias inside Syria.

Turkey’s Defense Ministry blamed Syrian Kurdish fighters for the car bomb and said the death toll was at least 10 people. A spokesman for the Syrian Kurdish units denied any role.

A report by Turkey’s semiofficial news agency, Anadolu, put the death toll higher, saying that 18 civilians had been killed in the explosion, which it said was caused by two car bombs.

Videos of the aftermath showed vehicles in flames, columns of gray smoke and men dragging wounded people away from a the crowded part of the town where the blast occurred.

The government of President Recep Tayyip Erdogan has said Turkey’s offensive was aimed at clearing the border of Syrian Kurdish fighters who it considers terrorists and a national security threat. Erdogan also seeks to create a “safe zone” that could accommodate millions of Syrian refugees now staying in Turkey.

But the invasion has subjected Turkey to broad criticism.

Western governments have warned that the offensive could lead to a resurgence of the Islamic State militant group. Ethnic Kurds in the region fear that Turkey’s goals include shifting the demographics of the area and replacing Kurds with Arab residents from elsewhere in Syria.

During a visit to Washington this past week, Erdogan received a warm welcome from Trump but an earful from members of Congress who were angered that Turkey had attacked Syrian Kurdish fighters allied with the United States.

The Kurdish-led Syrian force, known as the Syrian Democratic Forces (SDF), had aided the United States in its fight against the Islamic State. Ankara bristled at the alliance because the Kurdish fighters have links to the Kurdistan Workers’ Party, or PKK, which has fought a long insurgency against Turkey.

A message posted on Twitter by the Turkish Defense Ministry on Saturday said “inhumane and uncivilized PKK/YPG terrorists continue to target innocent civilians using the same methods as” as the Islamic State, referring to the Syrian Kurdish People’s Protection Units.

Mervan Qamishlo, a spokesman for the SDF, denied that Kurdish fighters were responsible for Saturday’s attack. He accused Turkey of trying to smear the force and of shifting blame for “massacres and violations” carried out by Syrian rebels who serve as Turkey’s main ally in Syria and who have been accused of committing atrocities during the latest Turkish offensive.

Al-Bab, where Saturday’s attack occurred, came under Turkey’s control during a military incursion three years ago and is about 17 miles from the border. Turkey’s government has promoted its development efforts there — which include millions of dollars spent on a new hospital and refurbishing schools — as evidence of its ability to restore order and calm in northern Syria.

Dadouch reported from Beirut.