From teachers to doctors, those forced to serve during ISIL’s occupation of Iraq face up to 20 years in prison.

Mosul, Iraq – As the city fell to the occupation of Islamic State of Iraq and the Levant (ISIL) five years ago, many doctors in Mosul’s public hospital ripped off their scrubs and fled.

Labeeb, a doctor himself, was unable to join his colleagues in their escape as he had just reached the hospital with his wife who was showing complications in her pregnancy.

“There were lots of gunshots… The doctors even left their patients and ran away,” Labeeb, whose name has been changed to protect his identity, told Al Jazeera in an interview last month.

His wife needed a caesarean section though the anaesthetist had already fled, leaving her to bear a child with a birth defect at 8pm on June 9, 2014 – the same day ISIL took over the city.

“My child was about to die. It was a tough time. It forced me to stay in the hospital and witness everything,” he said.

Labeeb, employed by the Iraqi government, is one of the hundreds of government employees under investigation for working under ISIL, also known as ISIS.

As the group occupied the city, it began building its administration from the foundations of the existing Iraqi government workforce.

It was the blueprint the armed group set up across all the territories it controlled. At its peak, ISIL employed thousands of teachers, doctors and various civil employees, even down to municipality drivers.

Considering Labeeb remained in Mosul to care for his wife and newborn child, ISIL took advantage of his expertise.

As Human Rights Watch (HRW) has pointed out in various reports, including Flawed Justice – Accountability for ISIS Crimes in Iraq, all civil employees are subject to investigation and prosecution under the government’s blanket system for dealing with ISIL affiliates under its counter-terrorism law.

Forced to work

Within a month after the birth of his child, Labeeb received a phone call informing him to meet in a cafe in Mosul to discuss going back to work.

“I felt shocked because I didn’t know who they were,” he said.

His number was obtained by ISIL from the Nineveh government employment records.

English teacher Younis Muawiyah, 35, a government employee at Mosul High School since 2008, fell into the same position as Labeeb when the armed group seized control of the city.

“At first they sent me a message saying: ‘You should come into the school because we need you.’ I didn’t answer them. I ignored it at first,” Muawiyah said.

“The second day they sent me another message: ‘You should come otherwise we’ll punish you.'”

Muawiyah reluctantly went back to work, teaching a class of 150 ISIL children.

“They learned English in order to know what their enemies, such as the US, said,” he added.

English teacher Younis Muawiyah has been a government employee at Mosul High School since 2008 [Tessa Fox/Al Jazeera]

There are no exact numbers of government workers currently prosecuted or facing investigation under the counter-terrorism law, though HRW has documented charges against a “wide range” of individuals.

Salim Muhammed Noori, chief judge of Nineveh Court, told Al Jazeera it was difficult for a government employee to work for ISIL.

He said people did not have to stay in Mosul when ISIL came. “A lot of important people left the city,” Noori added.

Harsh sentences

The Iraqi justice department has an investigation division that looks into the cases of those who worked for ISIL, gathering written witness statements and evidence.

HRW said only in a handful of cases has the court questioned witnesses or called them in to give evidence.

Considering many arrests are based on names provided to the security forces from ordinary civilians, there are cases where feuds between people have resulted in someone’s name being submitted as an act of revenge, residents told Al Jazeera.

Muawiyah said, due to false witness accounts, there were many people in prison who did not work with ISIL.

“If I hate you, I can go to the police station and say this person worked with ISIL. You’re innocent but you’ll stay in prison until they check, and after that the government just says ‘sorry’,” Muawiyah said.

Noori confirmed this version of Iraqi “amnesty”.

“If somebody is sent to prison because they killed someone then afterwards we find the person is not dead – they get out of prison,” he explained.

HRW also highlighted charges are often based on confessions extracted under duress.

Labeeb continued working for three years under ISIL rule, even after the Iraqi government cut salaries in mid-2015, and the group offered no payment.

He worked at the Mosul Oncology Hospital, in which ISIL’s leadership used the basement as a hiding place and patients and workers as human shields from air raids, Labeeb explained.

He was instructed not to examine female patients, but he refused their order.

“ISIL couldn’t punish doctors because numbers were very few and they needed us, so they would only say bad things to us,” Labeeb said. He said his constant refusal to follow ISIL’s orders led to the investigation against him to be dropped by Iraqi authorities.

“The intelligence says I didn’t join ISIL. It was proved I was innocent,” Labeeb said. “I tried to get away from them as much as I could, so I didn’t interact with them. Others may have had direct contact with them, [so they are] the people who are in danger now,” he added.

In the Nineveh Counter-terrorism Court, under which the Mosul region falls, if someone is found guilty of a killing in the name of ISIL they are sentenced to death by hanging.

The minimum sentence given for someone who joined ISIL, including those who worked under the group, is 15 to 20 years in prison.

Noori said each case is carefully considered, but he acknowledged it was not an easy task.

“While ISIL never had any human rights and did so many bad things to the Iraqi people, [we have] guarantees to protect these suspects,” he said.

Granting amnesty

For those convicted in Iraqi courts, some may be entitled to release under the General Amnesty Law.

For this to be possible, the person convicted would have to provide evidence showing they joined ISIL against their will and did not commit a serious offence.

Belkis Wille, HRW’s senior Iraq researcher, said it is difficult for people to prove they were forced to work for the armed group because the bar has been set so high.

“The government would argue that you should have stayed at home, because by then you aren’t working for the Iraqi government any more. So why did you continue to work,” Wille said.

Even though this law exists, and would benefit the government workers forced to work under ISIL, HRW found the majority of judges handing counter-terrorism cases are not applying it.

HRW detailed a senior counter-terrorism judge in Nineveh who expressed his refusal to apply the law “because he thought no one who provided any support to ISIL deserved an amnesty”.

It is also noted a senior judge recommended the death penalty for a man who was a cook for ISIL fighters.

Wille said there should be broad amnesty applied to people who are not linked to violent crimes.

“Particularly for those in government functions that helped keep the rights of people in that area, so people could continue to have access to water, electricity, et cetera,” Wille said.

The way prosecutions are being handled are misguided and not helping the future of Iraq, she added.

“There’s no comprehensive transitional justice action plan where prosecutions play a key role in helping to heal wounds and foster reconciliation,” Wille said.