BEIRUT — The Islamic State was routed on Monday from one of its key strongholds on Syria’s border with Turkey after its defenses crumbled and its fighters either defected or fled, raising new questions about the group’s vaunted military capabilities.

The fall of the town of Tal Abyad to a Kurdish-Syrian rebel force backed by U.S. airstrikes came after just two days of fighting during which the militants appeared to put up little resistance, focusing instead on escaping to their nearby self-styled capital of Raqqa or fleeing across the border to Turkey.

The force, led by Kurdish units of the People’s Protection Units, or YPG, and including local battalions of the rebel Free Syrian Army, pulled down the Islamic State flag from the border crossing with Turkey earlier on Monday and by nightfall claimed they were in control of the town center.

There were reports of scattered fighting on the western outskirts of Tal Abyad, but the advancing force had already severed the militants’ escape route, closing in on the town Sunday in a pincer movement from the east, south and west.

It appeared the Islamic State had suffered a stunning defeat, its first major reversal since it was driven out of the Iraqi city of Tikrit in April, and one that could prove far more consequential. Tal Abyad commands the major trade and smuggling routes on which the Islamic State has relied for its supplies from the outside world, and, most significantly, the flow of foreign fighters to Raqqa, the first major city it conquered.

If the Kurdish-led force consolidates its hold over Tal Abyad “it will be a major setback for the Islamic State and a major strategic victory,” said Jennifer Cafarella of the Washington-based Institute for the Study of War.

There were signs that at least some fighters simply gave up.

Photographs posted on social media by local activists showed groups of Islamic State fighters surrendering to Turkish forces and being led away after fleeing across the border.