The shells were already roaring down on the Kurdish fighters from the hill above Kobani when more than 30 Islamic State militants backed by snipers and pickups mounted with heavy machine guns began their assault across the dusty fields.

Holed up in an industrial area of squat, concrete buildings on Kobani's eastern edges, the outgunned Kurds could do little to repel the attack, recalled Dalil Boras, one of the defenders during the Oct. 6 assault. The Islamic State group's firepower proved too much, so the Kurds withdrew through the gray streets to a tree-lined park, ceding a foothold in the town to the extremist fighters, who promptly raised two black flags over their newly conquered territory.

A week later, the Kurdish men and women of the People's Protection Units, or YPG, are still holding out, if barely, with a helping hand from more than 20 airstrikes by the U.S.-led coalition against Islamic State positions.

They have been battered by tanks shells and mortars, and picked off by snipers using American-made rifles. They have no answer for the heavy weapons that Islamic State fighters have looted from Iraqi and Syrian army bases. And while they are slowly yielding ground, they so far have prevented the town from being overrun, defending it zealously with little more than light weapons, booby-traps and a fervent belief in their cause.

Along the way, the predominantly Kurdish town along Syria's border with Turkey has been transformed from a dusty backwater into a symbol of resistance for Kurds around the world. It also has grabbed the international media spotlight, which has helped turn the defense of Kobani into a very public test for the American-led international effort to roll back and ultimately destroy the Islamic State group.

The battle itself is now playing out in Kobani's streets and alleyways — a fight being watched by scores of Syrian and Turkish Kurds, as well as dozens of journalists, through binoculars from hilltops and farms just across the border in Turkey.

From that vantage point, the town spreads out among the rocky hills and brown fields just beyond the frontier. Plumes of black smoke billow over the low-slung skyline. The occasional thud of mortar shells mixes with the clatter of heavy machine guns and assault rifles.

Kurdish fighters and civilians who have recently fled describe a much grittier scene inside the town. Both of the warring sides have knocked holes in walls to move between buildings — a tactic employed in urban fighting for decades. On cross streets, blankets have been hung to limit exposure to snipers. Rubble litters the streets. Smoke hangs in the air. The few remaining civilians have sought shelter in basements.

Boras, a short and stocky 19-year-old dressed in dusty black jeans and a black T-shirt, explained how Kurdish fighters are organized into small groups of sometimes as few as five or six people, who stake out positions on the front lines. Teams with rocket-propelled grenades and Russian-designed machine guns known here as "Doshkas" have taken up positions in the upper stories of some buildings to maximize the Kurds' limited firepower.

"We are communicating with walkie-talkies," Boras said recently during a three-day break from the fight. "We tell them on our walkie-talkie that they're attacking and we throw a red smoke bomb to show the position of the attack, and then the machine guns and RPGs provide support."

Kurdish men and women fighters spread out on the various fronts are mainly armed with Kalashnikov assault rifles and grenades. They carry backpacks with ammunition, biscuits and canned beans and hummus, and when they run low they call into headquarters.

"We have special words for martyrs, wounded, ammunition and food on the walkie-talkie," Boras said. They frequently switch frequencies to avoid being spied on over the airwaves.

Since the Islamic State group first moved into Kobani's eastern districts on Oct. 6, the fighting has developed a familiar rhythm, the Kurds say: The extremists own the day, while the Kurdish forces rule after sundown when the Islamic State's heavy weapons can't effectively target Kurdish positions.

"At night, we go out on missions to hunt them down. During the day they put pressure on us," said Boras. "We watch during the day to see where they are. And then if there's a street that needs it, we plant roadside bombs to hit them with during the day."

With limited resources, the Kurds have had to improvise. Boras recalled on one occasion packing a truck tire with explosives and then rolling it down the hill toward Islamic State fighters, destroying a machine gun post.

As the fighting has ground down in the thick of the town, the front lines in some places have narrowed to just a few meters (yards), said Aladeen Ali Kor, a Kobani policeman now volunteering in a refugee camp in the Turkish town of Suruc while he recovers from a shrapnel wound to the back of his neck.

"There are some places where you're basically across the street from them. Like from here to the back of the gas station there," he said, pointing across the busy main road in Suruc. "Fighters on both sides yell and taunt each other. We say we'll never let you in. They yell at us that they'll never let us out alive."

Kor, a stout 36-year-old with a tightly-cropped brown beard flecked with gray, said most of the Islamic State fighters captured by the YPG are Syrian, although there are also many Turks, Chechens and Yemenis mixed in among them.

At one point, he pulled back the white hand towel rolled up on his neck to show the three stitches and swollen wound. He was out on a patrol, he said, when a mortar round slammed into a building nearby, followed by a second that hit the street.

"Another guy was wounded in the leg and belly, and two guys were killed," he said. "I didn't pass out, but I was dazed. Friends took me to an ambulance. There was blood everywhere."

Most of Kobani's wounded are brought to the hospital in Suruc. Two emergency room nurses taking a short break recounted the chaos of the past few weeks.

"We usually see 25-30 wounded a day. They are serious injuries. Mostly from gunshots and shrapnel," said one of the nurses who only identified himself as Mehmet. The nurses estimated that 70 percent of the wounded are fighters, while the rest are civilians.

For now at least, the heart of Kobani remains in Kurdish hands, although their grip appears tenuous at best. With so much attention on the town, neither side can relent. Activists say the Islamic State group has rushed in reinforcements, while small numbers of Kurds continue to sneak across the border to join the fight.

One of them is Boras. Reached by telephone late Saturday night, he said he had slipped back into Kobani and returned to the front. Having already lost his father and a brother fighting the Islamic State, he said he sees no alternative but to make his stand there.

"Either Kobani will fall and I will die, or we will win," he said.

___

Mohammed Rasool contributed to this report.

___

Follow Ryan Lucas on Twitter at: www.twitter.com/relucasz