Courage: Fighter Nesrin Abdi pictured with her comrades on the battlefield in Kobane

You wouldn’t know it from her sweet smile, but the reason why Nesrin Abdi carries a rifle is in case she needs to shoot herself dead.

This, she explained matter-of-factly, would be preferable to being captured by the monsters of Islamic State.

Nesrin, a 20-year-old medical student, is by all accounts a happy, well-educated, middle-class young woman with an infectious joy for life.

In her home town of Kobane on the Syria-Turkey border, moments of joy are rare, but a photograph captures the triumphant moment three days ago when she was among Kurdish fighters who recaptured a strategic hill from the Islamic State invaders.

The jihadis’ sinister black flag was torn down and replaced with a fluttering Kurdish red-and-yellow banner, marking what may well prove a symbolic turning point in the life-and-death struggle for the besieged town.

But Nesrin, a doctor’s daughter who has joined an army of women battling to defend Kobane, is aware that every day could be her last.

She told me: ‘Everyone knows what happens if IS catches you. For a woman it is rape, followed by beheading. We have all seen the videos of the American and British hostages beheaded in the desert. They will treat us the same.

‘I carry a Kalashnikov and if I am cornered face-to-face with an IS fighter, I don’t know exactly what I will do. Maybe I will kill him or maybe I will kill myself.’

The battle for Kobane has raged for a month and the stakes could hardly be higher. On Nato’s doorstep, it has become a litmus test of the resolve of America and its allies to crush the growing menace of Islamic State.

The bloodthirsty fanatics are pouring in reinforcements and have the town in a deadly stranglehold, with up to 13,000 civilians trapped inside, including the elderly and babies hungry for milk. The United Nations has warned of ‘another Srebenica’ — like the massacre in Bosnia in 1995 — unless the world acts.

Photographer Jamie Wiseman and I have been witnessing the struggle unfold from a Turkish hilltop overlooking the town. In the past four days, cheered by Kurds on the hilltop, the U.S. has stepped up the coalition bombing campaign of IS targets, claiming its warplanes have blown up 600 jihadis along with American tanks and artillery that they pilfered from the Iraqi army.

The U.S. blitz is welcome — one Kurdish couple have named their newborn son Obama in gratitude — but the battle cannot be won by air power alone.

Nesrin, circled, pictured at a ceremony in July when she joined the YPJ fighters to defend her hometown of Kobane from ISIS militants

Nesrin, pictured left in her YPJ uniform and at a Kurdish National celebration, right, says the jihadists are feared of being killed by a woman

On the ground, resistance troops have taken advantage of the air raids to mount an unlikely comeback and retake some parts of the town. They are commanded by a woman, and dozens of female fighters swell their ranks.

When I spoke to Nesrin Abdi yesterday, she explained why the all-female wing of the Kurdish force defending Kobane — the YPJ — is striking fear into the hearts of the jihadi men.

‘For Daesh [an Arabic term for IS], to be killed by a woman means he will not go to Heaven. When we fight them, we are fierce and we let them know they are being killed by women,’ she said.

Miss Abdi, far left, pictured with her school friends before the war. She says Kurdish women have been fighting alongside the men since the 1930s

Nesrin pictured as a child. Her mother has now fled the fighting in Kobane and gone to Turkey but says she is proud of her daughter

In the heat of battle, the female Kurdish fighters issue a chilling war cry — a shrill warble — to announce their presence to their black-clad foes.

‘It is so, so important that it is women fighting IS,’ said Nesrin. ‘In their culture, women are slaves. They treat them as objects whose lives are worth nothing.’

In the warped world of the Islamic caliphate, which has stunned the world with its sweeping victories across Syria and Iraq, girls and women lose all rights and forgo their education. Some are even sold into slavery.

In flames: Fires burn among shattered buildings in the Syrian border town of Kobane as darkness falls

Nesrin said: ‘Kurdish women have fought hard to prove their equality, and fighting Daesh is a symbol of our freedom.’ About a quarter of the fighters in the Syrian Kurdish army — some 10,000 — are women. Of these, at least several hundred are currently believed to be fighting inside Kobane. They speak of being ‘closer than sisters’.

Recruitment to the YPJ is voluntary; women join up because it is in their blood. They have been fighting alongside men in Kurdish ranks since the 1930s — and even before they were allowed on the front line, some dressed up as men to enlist.

Kurdish activist Hatice Cevik said: ‘Not all women fighting right now were fighters before the war started. They were working or studying. Some of them were housewives. Women in Kobane are fighting for their freedom and Kurdish men are proud of that.’

Nesrin’s mother (her father died when she was young) has fled to Turkey but is also full of pride, though she is gripped with terror at what might become of her.

‘Of course she worries all the time,’ said Nesrin, who also has an elder sister. ‘But what can I do? I cannot make her feel relaxed. I always tell her this is my duty. I am a girl from this town and I need to defend it. My father and mother were born here, our ancestors are buried here — these things make me strong.

‘It would be better to die for freedom here than to live anywhere else.’

Nonetheless, it is a wretched existence. The exhausted, battle-weary fighters snatch sleep when they can, often for no more than an hour at a time.

Desperate situation: Medication is in short supply in the town and doctors warn that after this weekend they will be out of antibiotics, bandages and anaesthetic

Clutching their rifles and hand grenades, they drift off knowing that a mortar bomb landing nearby might mean they never wake.

The nights are particularly cruel because then there is no hiding from the jihadis, who gleefully brag on social media that they can see in the dark with their looted American night-vision goggles.

The street fighting rages around the clock. Propaganda videos released by the Kurds show women and men fighting alongside each other against the jihadis, blasting away with their battered Kalashnikov rifles through slots in walls.

Nesrin feels afraid every night, but says she is ‘getting used’ to the bone-shaking booms of the shelling and airstrikes.

Speaking to me from across the border on her mobile phone, with the help of a Kurdish translator, she described how the fighters keep their spirits up.

‘We listen to songs and we sing songs. In spite of the death around us there is also love of life, and love of free lives,’ she said. ‘This gives us moral support. To be defending your home town is life itself.’

I asked if she dreams of the future to keep her spirits strong, and she said: ‘I will go back to my university to become a doctor. I was only in the second year.’

Fog of war: Thick black smoke rises slowly from an exploded car in the stricken town

She also wants to document the battle unfolding around her so the world can see what is happening.

What about a husband and children? She laughs. ‘In this situation, I don’t know. I cannot think about these things at the moment. I think I am too young.’ In Kobane, those old enough to carry a gun — and even some who are not — are armed.

‘Everybody is fighting. There are women my age who have been given hand grenades to throw,’ says a 63-year-old woman called Alife Ali at a hospital in Suruc, just across the border in Turkey. ‘We will fight to the last person.’

Behind the front line, mothers whose sons and daughters are fighting organise meals for everyone, using tinned food topped up with stocks of tomatoes and cucumbers. In the stricken town money is no longer worth anything, so the dwindling supplies of food can be obtained for free.

But medication is in short supply and doctors warn that after this weekend they will be out of antibiotics, bandages and anaesthetic. Powdered baby milk has run out.

Some joke optimistically that ‘when the war is won by women’ they will make men do the washing-up for evermore.

Shell shock: The people of Kobane endure the daily bone-shaking booms of the shelling and airstrikes

Local politician Imad Shahin, from the Kurdish PYD party, said: ‘Islamic State are trying to commit genocide against us.

‘We are being attacked by these monsters because we have equality between men and women. In a Muslim society some think it is shameful for a girl to fight, but our fighters have broken all the rules to show the world that our women are free.

‘The bravery of the women makes the men fight harder because they don’t want to be outdone by a woman.’

Indeed, a woman is leading the battle to save Kobane. With the nom de guerre Narin Afrin, and described as ‘beautiful, innocent and strong’, she is general commander of the troops defending the town.

She has been lionised on social media. Maajid Nawaz, of the counter-extremist Quilliam Foundation think-tank in London, wrote on Twitter: ‘Hero. Remember her name.’

Familiar battleground: Street fighting rages around the clock with men and women from Kobane fighting alongside each other against the jihadis

Earlier this week Narin Afrin appealed for heavy weapons, saying in a statement posted online: ‘IS are using tanks. Unfortunately we don’t have anti-tank weapons.’

After a month of horror, the desperation on both sides is mounting. Gains made by the Kurds this week, with the help of American airstrikes, have given them hope of being able to sweep the jihadis out of town. But for how long?