AKCAKALE, Turkey — Thousands of Syrians cut through a border fence and crossed into Turkey on Sunday, fleeing intense fighting in northern Syria between Kurdish forces and Islamic State fighters.
The flow of refugees came as Syrian Kurdish fighters closed in on the outskirts of a strategic militant-held town on the Turkish border, Kurdish officials and an activist group said, potentially cutting off a key supply line for Raqqa, the nearby de facto capital of the Islamic State.
Taking Tal Abyad, some 50 miles north of Raqqa, would deprive the militant group of a direct route to bring in new foreign militants or supplies. The Kurdish advance, coming under the cover of intense US-led coalition airstrikes in the area, would also link their two fronts and put even more pressure on Raqqa.
In this Turkish border village, the refugees took by surprise the Turkish troops stationed there, who were overwhelmed by the large number of people crowding the crossing. Thousands of people had been gathering for more than a day on the Syrian side of the Akcakale border crossing before they broke through Sunday.
People threw their belongings over the fence while others passed infants into Turkey over barbed wires before passing through a several-yard-wide opening in the border fence.
Turkish troops brought in reinforcements and gathered up the refugees on the Turkish side of the border, preventing them from going deeper into Turkey.
Earlier Sunday, Deputy Prime Minister Numan Kurtulmus, speaking on the refugee situation at the crossing between in Tal Abyad and Akcakale, claimed that those refugees were not fleeing fighting between Kurds and the Islamic State, but were rather trying to escape to Turkey in case their villages are hit by US-led coalition bombings.
He said Turkey was providing humanitarian aid to them on the other side of the border while taking in anyone who is sick or injured. Kurtulmus said Turkey has taken in more than 2 million refugees since 2011.
‘‘There isn’t a humanitarian tragedy there,’’ Kurtulmus told CNN-Turk television. ‘‘Our priority is for them to remain within their border. We will continue to provide humanitarian aid to them.’’
Hours after Kurtulmus spoke, Turkey reversed its decision and opened the border to allow more of the refugees in, the state-run Anadolu Agency reported. It said, however, that this time Islamic State militants at the border prevented them from crossing into Turkey.
It put the number of people who were waiting to cross at around 2,500. Around 13,400 Syrians have fled to Turkey since June 1, the agency said.
On Sunday, Kurdish official Idriss Naasan said Islamic State fighters have fled from Suluk, a few miles southwest of Tal Abyad, and that Kurds now hold the town. The Britain-based Syrian Observatory for Human Rights also said Islamic State fighters had withdrawn. The group said the Kurds are about 3 miles from Tal Abyad.
‘‘It’s only a matter of time before this area is liberated,’’ Naasan said by telephone from northern Syria, saying the Kurds surround Tal Abyad from the east, west, and south. The Turkish border — and the soldiers there — now hem the extremists in from the north.
But Rami Abdurrahman, who heads the observatory group, said Islamic State fighters still control the road linking the Turkish border with Raqqa.
Since the beginning of May, members of the main Syrian Kurdish force, the People’s Protection Units, or YPG, have taken more than 200 small Kurdish and Christian towns in northeastern Syria, as well as strategic mountains seized earlier by the Islamic State.
They have pushed into Raqqa province, a stronghold of the Islamic State. Along the way, they have picked up ammunition, weapons, and vehicles left behind by the jihadis, almost mirroring the way the extremists overran Iraqi positions last year.