MOSUL — Leila Khaled hadn’t felt well that morning. It was the end of August, when the Iraqi summer sun had hit the walls and windows hard, like the wind in the middle of a powerful storm. Mosul was still in the clutches of ISIS. The war was still far away; it was being raged in the south of the city.

Leila decided to go to the clinic in the Tahrir neighborhood in the suburbs of eastern Mosul. She got dressed. This required meticulous preparation. She had to follow the strict ISIS dress code. The terror group didn’t allow anyone to flash the slightest bit of skin.

Leila slipped into a dress. On top of it, she wore a jilbab — a loose and wide cape that hides the shape of women's bodies. For her face, she put on a niqab or full veil that only left her eyes uncovered. To then hide her eyes, she added a "sitar" — a very thin piece of cloth that allowed her to see without being seen.

ISIS reminded women of those rules through advertisements everywhere. Although makeup was forbidden, Leila couldn't refrain from applying a touch of mascara to her eyes. She put on her socks and gloves. She was ready, finally.

Her husband, Walid, accompanied her to the clinic. Under the rule of ISIS, a woman wasn't allowed outside without a close male relative who acts as a guardian to escort women in their travels. Walid walked in front, Leila followed him. Suddenly, she stumbled. She hurt her right foot. She called her husband, "Walid!" She wanted to see what had happened. She lifted up her sitar.

"We're going to bite your wife."

Walid heard his wife trip and call for him. He turned, he wanted to help but already two members of the Hisba, the moral police of ISIS, were introducing themselves. "Do not touch her," they said.

Walid refused to obey and raised his voice. "I want to help her!"

Speaking to Leila, the officers said, "Cover your face."

"I want to see what's happened," she replied, perhaps a tad too loud. Under the rule of ISIS, no man should hear the voice of a woman above his own.

Using their walkie-talkies, they called for female Hisba police. "We're going to bite your wife," they told Walid.

Three policewomen wearing Hisba's black headband joined them. They forced Leila to stand up. Walid apologized; he offered to pay them. His wife was taken to a candy shop, where the inside couldn’t be seen, while he was forced to wait outside. Two of the women held Leila. The third lifted her veil and bit Leila as hard as she could, so hard that Leila fainted.

We're going to bite your wife.

The moral police outside took Walid's ID card after giving him a receipt. He was able to get it back three days later at Hisba's headquarters inside a former church in Mosul. He was fined 50,000 Iraqi dinars ($40).

"Was your wife bitten?" a judge asked him. "Yes, you can read it here on the receipt,” Walid replied, outraged.

"Good, because otherwise, we would have had to have her bitten." Five months later, the marks on Leila's arm are still visible.

Leila's case isn't an isolated one. Under ISIS, women who showed the slightest bit of skin in public were pinched with pliers. For more serious infractions, like Leila's, they were bitten. The last stage involved metal jaws.

"I've had to treat three women who had bits of flesh ripped off by that instrument," says a doctor, who wished not to be named and who was forced to work for ISIS.

Farah was bitten by these metal jaws at Mosul's Muthanna souk in the summer of 2015 because she wasn't wearing a sitar. Her left arm still bears the scars. "She was bleeding but we didn't dare go to the hospital, to not get into more trouble," her husband Aziz Abdallah Khalaf says. "It took 40 days for the wound to properly heal.”

No one knows who invented the punishment. It certainly isn’t Islamic tradition. It began to be carried out at the start of 2015 in Iraq as ISIS imposed its rule on territories it conquered. To enforce the new measures, ISIS set up Hisba, a police unit to ensure women adhered to their dress code and to make sure that both sexes were separated in public.

ISIS believed women had a certain role: to give birth and raise a new generation of jihadists.

"In the organization's ideology, each sex was given clear roles, complementary but equal in the eyes of Allah," explains Géraldine Casutt, a Swiss PhD student at the University of Fribourg whose thesis focuses on the role of western women in ISIS.

"Making children is as important as fighting. It's a military strategy. If the territory should be retaken, there needed to be a new generation to perpetuate the ideology. ISIS, therefore, gave value to the female status for strategic reasons. That allowed it to build a society and then to create a state with the need to establish institutions."

Other women played a more active role. When they were related to or married to jihadists, they enjoyed a certain authority. They could then become teachers or Hisba members. The organization had, for instance, promoted through an intense propaganda campaign an all-female Hisba unit, the Katiba al-Khansa, named after a female poet of the early Islamic era.

Set up in 2014 in Raqqa, the Syrian "capital" of ISIS, the unit's job was to "raise awareness, arrest and punish those who don't respect Islamic law," Abu Ahmed, an ISIS leader had said when he announced the brigade's creation. "Jihad isn't just a man's duty. Women also have to do their part.”

On Iraqi soil, it seems that the majority of Hisba members were women from the Arab Sunni Muslim community. Now that these parts of Mosul have been liberated, the question of their arrest is being raised.

"Our problem here is the law of the clans," says one lieutenant. “Being arrested equals a death penalty for women."

At the offices of the intelligence services of a small town near Mosul, a female prisoner is held. She's outfitted in a dark dress, dark veil, and a dark expression. We'll call her Yousra. She's 44 years old and accused of having served in the Hisba in the Tigris Valley. According to the lieutenant, there used to be between 40 and 60 Hisba members there.

Being arrested equals a death penalty for women.

Yousra was arrested in late January. She was trying to flee Mosul, the de-facto capital of ISIS, for a refugee camp. She presented herself at a checkpoint. As she gave her name, she was identified as the close relative of Abu Talut, a leading figure inside ISIS, who is the equivalent of a prefect for the Tigris Valley. Talut belongs to the powerful Talut clan that joined the ranks of ISIS.

Yousra claims she was only arrested because she's the wife and sister of jihadist fighters. "Killing me is now any ISIS member's duty," she says. Why? To be a prisoner of Iraqi authorities brings shame to the clan. As a relative of a leading ISIS figure, she is also subject to a code of silence that is often respected at all costs.

"You don't know what they're capable of. My life isn't worth more than a burnt piece of paper,” she says.

Guilty or not, Yousra will never be able to go back to her community. Under Iraqi anti-terror law, she faces up to 15 years in prison.

She may be the unlucky one. In many cases, authorities prefer to let former female members of ISIS escape. If they arrest them, they know they risk triggering a new wave of violence.