With more than a thousand militants killed and territory slipping away, the Islamic State group is losing its grip on the Syrian border town of Kobani under intense U.S.-led airstrikes and astonishingly stiff resistance by Kurdish fighters.

It is a stunning reversal for the Islamic State group, which just months ago stood poised to conquer the entire town — and could pierce a carefully crafted image of military strength that helped attract foreign fighters and spread horror across the Middle East.

"An IS defeat in Kobani would quite visibly undermine the perception of unstoppable momentum and inevitable victory that IS managed to project, particularly after it captured Mosul," said Faysal Itani, a fellow at the Atlantic Council, referring to the militants' seizure of Iraq's second-largest city during its blitz into Iraq from Syria last summer.

It would also rob the group of a "psychological edge that both facilitated recruitment and intimidated actual and potential rivals, as well as the populations IS controlled," Itani said.

In September, Islamic State fighters began capturing some 300 Kurdish villages near Kobani and thrust into the town itself, occupying nearly half of it. Tens of thousands of refugees spilled across the border into Turkey.

By October, Islamic State control of Kobani was so widespread that it even made a propaganda video from the town featuring a captive British photojournalist, John Cantlie, to convey its message that Islamic State fighters had pushed deep inside despite U.S.-led airstrikes.

The town, whose capture would give the jihadi group control of a border crossing with Turkey and open direct lines between its positions along the border, quickly became a centerpiece of the U.S.-led air campaign in Syria. U.S. Secretary of State John Kerry declared it would be "morally very difficult" not to help Kobani.

The U.S.-led air assault began Sept. 23, with Kobani the target of about a half-dozen airstrikes on average each day, and often more. More than 80 percent of all coalition airstrikes in Syria have been in or around the town.

Analysts, as well as Syrian and Kurdish activists, credit the air campaign and the arrival of heavily armed Kurdish peshmerga fighters from Iraq, who neutralized the Islamic State group's artillery advantage, for bringing key areas of Kobani under Kurdish control. These include a cultural center on a strategic hill overlooking several neighborhoods east and southeast of the town, which was captured in December, as well as a neighborhood that houses government buildings and a police station.

"The U.S.-led coalition airstrikes turned the balance. ... Without airstrikes, most likely the city would have been much more difficult to defend," said Wladimir van Wilgenburg, an expert on Kurdish politics who writes for The Jamestown Foundation, a U.S.-based research center. "The peshmerga did play a role, but it was mostly the airstrikes."

In the past month, the Kurdish fighters have made more advances, leading to a remarkable battlefield shift.

Rami Abdurrahman, who heads the Britain-based Syrian Observatory for Human Rights, estimates the Kurds now control roughly 80 percent of Kobani. Kurdish forces offer similar estimates. Four months after barreling into the town, the extremists barely hold Kobani's southern and eastern edges, activists and residents say, despite weekly reinforcements to protect what it clearly views as a major strategic prize.

Since mid-September, the battle has killed some 1,600 people, including 1,075 Islamic State group members, 459 Kurdish fighters and 32 civilians, according to the Observatory.

"Kobani is on the verge of being free of the Islamic State group," Abdurrahman said. The militant group's "death toll is very high and they are not able to advance."

That doesn't mean the Islamic State group is leaving without a fight.

The extremists have carried out more than 35 suicide attacks in Kobani in recent weeks, Abdurrahman and other activists said.

An Islamic State video released last week via social media, apparently to boost morale, showed jihadis fighting street battles as coalition warplanes flew overhead. It showed a truck loaded with explosives being detonated by a suicide bomber inside the town. The footage could not be independently authenticated, but it corresponded with Associated Press reporting on the situation in Kobani.

In the video, a Tunisian fighter among the large contingent of foreign jihadis fighting in Kobani, was shown wearing sunglasses and carrying a Kalashnikov assault rifle. He made a pledge to Islamic State group leader Abu Bakr al-Baghdadi that militants in Kobani were willing to fight to "the last drop of blood."

"We are not scared by their warplanes," the fighter said.

An Islamic State member based in central Syria, speaking to the AP via Skype, also insisted militants in Kobani faced no setbacks. He spoke on condition of anonymity because he wasn't authorized to discuss the Kobani campaign.

It is not clear how long the battle for Kobani might last. The Islamic State group brought in some 400 fighters, including many well-trained foreign recruits, during the first week of January, a Kobani-based Kurdish activist, Mustafa Bali, said.

Van Wilgenburg, the analyst, said losing Kobani would be a symbolic as well as strategic defeat for the Islamic State group. But he cautioned: "This doesn't mean it is the beginning of their defeat in Syria."

Shorsh Hassan, a spokesman for the Kurdish People's Protection Units, or YPG — the Syrian Kurds fighting alongside the Iraqi peshmerga in Kobani — praised the will of his fighters to battle the far better-armed Islamic State militants while losing "dozens of martyrs and wounded fighters."

"This is a price that we are happy to pay to liberate Kobani," he said.

___

Follow Bassem Mroue on Twitter at www.twitter.com/bmroue .