SAMAQA, IRAQ - When Islamic State insurgents fired mortar bombs at Iranian Kurdish women fighters holding a desert position in northern Iraq, the women first hit back by singing through loudspeakers.
Then the women opened fire with machine guns.
"We wanted to make them angry. To tell Daesh that we are not afraid," said Mani Nasrallahpour, 21, one of about 200 female peshmerga fighters who left behind their lives in Iran to take on the hard-line Sunni militants.
A commander said Islamic State — known to its enemies by the Arabic acronym Daesh — deliberately targeted the female unit with 20 mortars when the singing began.
Islamic State prohibits singing and music. It has also imposed tight restrictions on women and took hundreds of them as sex slaves since sweeping through northern Iraq in 2014 and declaring a caliphate in parts of Iraq and Syria.
The Kurdish women are part of a larger armed unit of 600 fighters aligned with the Kurdistan Freedom Party, known by its Kurdish acronym PAK.
This group has joined an array of Iraqi and Kurdish forces who are backed by a U.S.-led coalition in an offensive designed to push Islamic State out of their stronghold of Mosul.
It also has a far more ambitious goal of creating an independent Kurdish nation that would stretch across Iraq, Iran, Turkey and Syria — a concept those nations reject.
"We fight to protect our soil, whether it is the Kurdistan of Iran or Iraq. It does not matter whether it is Daesh or another group that has occupied our soil," said Nasrallahpour, clutching an AK-47 assault rifle.
Their presence is a reminder of the complexities of the battlefield in northern Iraq, where the women recently joined Iraqi male Kurdish fighters in driving Islamic State out of the village of Fadiliya.
Avin Vaysi ran into that fight toting a heavy machine gun and battling Islamic State street by street.
"They are afraid of women," she said. "It is true that Daesh is dangerous, but we are not afraid of them."
So far in the offensive, one woman fighter from the group has been killed.
Like the other peshmerga, Vaysi was enraged by news reports of the militants abusing women. She decided to take matters into her own hands.
"I saw on television that Daesh is torturing women, and it made my blood boil," said Vaysi, 32, who has a Kurdish flag painted on her cheek. "I decided to go and fight them."
The presence of the PAK in northern Iraq is controversial. Iran has pressured the Kurdistan Regional Government to expel the group.
Since the start of 2016, the PAK has clashed with Iran's Revolutionary Guards in Iran at least six times, said Hussein Yazdanpanah, military commander of the group.
Attempts to reach a Revolutionary Guard media office for comment were unsuccessful.
On Thursday afternoon, women fighters were lined up on a dirt berm, their weapons pointed at the front line with Islamic State about 700 meters away.
A woman walked by with a sniper rifle strapped to her shoulder. Nearby were a row of captured homemade Islamic State rockets fitted with propane tanks.
Knowing the atrocities Islamic State has carried out against women, Nasrallahpour said the female fighters had made a pact never to allow themselves to be taken captive.
"We always have a bullet ready to use on ourselves in case we are about to be taken prisoner," she said, rolling a Kalashnikov round between her thumb and forefinger.
She and others hope they can get their hands on Islamic State militants.
"We will tear them apart. When they have killed our babies in the womb, why should we show them mercy?" said Nasrallapour.
Fighters say they are treated equally by male comrades.
"We are 100 percent equals. We are proud of the women fighters," said Hajir Bahmani, 27, a male commander.
Female fighters go through six weeks of training that includes target practice and learning how to be a sniper.
"Along with defending our Kurdish land, we are also fighting for women's rights. Like a man, I can fight in the mountains and the desert," said Nasrallahpour.
Breaking stereotypes like keeping women in the kitchen is something the fighters take pride in.
"Here the men cook for us," said Nasrallahpour.