AKCAKALE, Turkey (AP) — Turkish forces faced fierce resistance from US-allied Syrian Kurdish fighters on the third day of Ankara’s offensive in northern Syria as casualties mounted, international criticism of the campaign intensified and estimates put the number of those who fled the violence at 100,000. In a complicating twist, Washington said its troops also came under fire from NATO ally Turkey.

No US troops were hurt in Friday’s explosion at the small US outpost, and the artillery strike marked the first time a coalition base was in the line of fire since Turkey’s offensive began.

US officials said the Americans have vacated the post on a hill outside the town of Kobani, and added that a large base in the town was not affected by the shelling. The officials spoke anonymously because they were discussing an ongoing military operation.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

Turkey said the US was not targeted and its forces were returning fire from Kurdish fighters about half a mile from the US outpost. The Turkish Defense Ministry said it ended the strike after communicating with the US.

Navy Capt. Brook DeWalt, a Pentagon spokesman, said the explosion came within a few hundred meters of the area where US troops were.

The artillery strike so close to American forces showed the unpredictable nature of the conflict days after US President Donald Trump cleared the way for Turkey’s air and ground invasion, pulling back US forces from the area and saying he wanted to stop getting involved with “endless wars.”

The decision drew swift bipartisan criticism that he was endangering regional stability and risking the lives of Syrian Kurdish allies who brought down the Islamic State group in Syria.

Earlier, Turkey said it captured more Kurdish-held villages in the border region, while a hospital in a Syrian town was abandoned and a camp of 4,000 displaced residents about 12 kilometers (7 miles) from the frontier was evacuated after artillery shells landed nearby.

Reflecting international fears that Turkey’s offensive could revive the Islamic State group, two car bombs exploded outside a restaurant in the Kurdish-controlled urban center of Qamishli, killing three people, and the extremists claimed responsibility. The city also was heavily shelled by Turkish forces.

Turkish shelling hit a prison holding IS militants in Qamishli, Syrian Kurdish officials said. They shared a video Friday showing a shell landing in the courtyard of what appears to be a prison facility. Seconds later, a handful of men open doors and seem to be trying to leave.

Kurdish fighters waged intense battles against advancing Turkish troops that sought to take control of two major towns along the Turkish-Syrian border, a war monitor said.

The UN estimated the number of displaced at 100,000 since Wednesday, saying that markets, schools and clinics also were closed. Aid agencies have warned of a humanitarian crisis, with nearly a half-million people at risk in northeastern Syria.

On Sunday, Trump cleared the way for Turkey’s air and ground invasion after he announced his decision to pull American troops from their positions near the border, drawing swift bipartisan criticism that he was endangering regional stability and risking the lives of Syrian Kurdish allies who brought down IS in Syria.

Trump had said at the time that the estimated 1,000 US troops were not in harm’s way from the Turkish offensive. Rami Abdurrahman, head of the war monitor Syrian Observatory for Human Rights, said the US base was on a hill near the Kurdish-held town of Kobani, which had come under heavy Turkish fire.

US Defense Secretary Mark Esper said Washington is not abandoning its Syrian Kurdish allies and pushed back hard for NATO-ally Turkey not to launch the operation. He said US troops are still working with Kurdish fighters.

Despite the criticism, Turkish President Recep Tayyip Erdogan said his country “will not take a step back” from its offensive.

“We will never stop this step. We will not stop no matter what anyone says,” he said in a speech Friday.

Plumes of black smoke billowed Friday from the Syrian border town of Tal Abyad as Turkey continued bombarding the area. The Turkish Defense Ministry said the operation was progressing successfully.

Turkey considers the Syrian Kurdish fighters to be terrorists linked to a Kurdish insurgency inside Turkey and says the offensive is a counterterrorism operation necessary for its own national security.

The Turkish Defense Ministry said four of its soldiers have been killed since Wednesday, with three wounded. Defense Minister Hulusi Akar said 342 “terrorists” — Ankara’s term for Syrian Kurdish militiamen — have been killed so far. The figure could not be independently verified.

The Kurdish-led force said 22 of its fighters were killed since Wednesday.

The Kurdish militia has fired dozens of mortars into Turkey in the past two days, including Akcakale, according to officials in two provinces on the Turkish side. They said at least 17 civilians were killed in the shelling, including a 9-month-old boy and three girls under 15.

Mourners in Akcakale carried the coffin of the slain boy, Mohammed Omar Saar, as many shouted, “Damn the PKK!” referring to the Kurdish insurgent group in Turkey linked to Syrian Kurdish fighters. The PKK is considered a terrorist group by Turkey, the United States and other countries.

One attack hit the town of Suruc, and a child in the town of Ceylanpinar died of his wounds Thursday night, Turkey’s Anadolu Agency reported.

On the Syrian side, seven civilians have been killed since Wednesday, activists said.

Russian President Vladimir Putin said he doubted the Turkish army has enough resources to take control of prison camps in the region housing Islamic State detainees, and he fears the captured fighters “could just run away,” leading to a revival of the militant group.

“We have to be aware of this and mobilize the resources of our intelligence to undercut this emerging tangible threat,” Putin said during a visit to Turkmenistan.

The Syrian Kurdish forces had been holding more than 10,000 IS members, but they said they are being forced to abandon some of those positions to fight the Turkish invasion.

Separately, NATO Secretary General Jens Stoltenberg urged Ankara to exercise restraint, although he acknowledged what he said was Turkey’s legitimate security concerns about the Syrian Kurdish fighters.

In a news conference with Turkish Foreign Minister Mevlut Cavusoglu, Stoltenberg also expressed concern that the offensive could jeopardize gains made against IS. Cavusoglu said Turkey expected solidarity from its allies.

“It is not enough to say you understand Turkey’s legitimate concerns; we want to see this solidarity in a clear way,” he said.

The White House also put Turkey on notice it could face new “powerful sanctions” and said the US will “shut down the Turkish economy” if Ankara goes too far. It didn’t elaborate.

Trump has expressed a desire to pull troops out of the Middle East, saying earlier this week he didn’t want America involved in endless wars in the region. Still, US officials said Friday they were deploying dozens more fighter jets and additional air defenses to Saudi Arabia to defend it against Iran.

The Turkish operation aims to create a corridor of control along Turkey’s border that clears out the Syrian Kurdish fighters. Such a “safe zone” would end the Kurds’ autonomy in the area and put much of their population under Turkish control. Ankara wants to settle 2 million Syrian refugees, mainly Arabs, in the zone.

Syrian Kurdish authorities said they were evacuating about 4,000 people in the Mabrouka camp, west of Ras al-Ayn, because of artillery fire. Aid groups say there was no direct hit on the camp, located 12 kilometers (7 miles) from the border.

Doctors Without Borders said the fighting forced it to shut down a hospital it supports in the border town of Tal Abyad serving more than 200,000 people because most of the residents had to leave, including the medical staff and their relatives.

The group said aid groups had to suspend or limit operations in the al-Hol camp, home to more than 70,000 women and children located 50 kilometers (30 miles) from the Turkish border, as well as the Ain Eissa camp.