KHAZER, Iraq (Reuters) - Bushra Mohammed married two years ago in her hometown of Mosul and bore a child last spring but as far as the Iraqi state is concerned she is single and her son does not exist.

Iraqi Special Operations Forces (ISOF) gather during an operation to clear the al-Zirai district of Islamic State militants in Mosul, Iraq, January 18, 2017. REUTERS/Muhammad Hamed

Bushra is one of thousands of Iraqis emerging from more than two years of Islamic State rule to find themselves in legal limbo: neither her marriage nor her son’s birth certificate issued by the militants are recognised by the Iraqi government.

As Iraqi forces retake territory from the militants, the state is working to reverse the bureaucratic legacy of Islamic State, which subjected millions to its rule after seizing large parts of Iraq during the summer of 2014.

At a makeshift court housed in a cluster of portacabins at a camp for the displaced in Khazer near Mosul, Iraqi bureaucrats are busily converting certificates issued by the self-declared caliphate into official government documents.

“We are changing them so that we can feel like citizens again,” said 20-year-old Bushra, her infant child tugging at the bottom of her abaya. “(Islamic State) are not a state: this is a state.”

Despite the violence and privation that came with Islamic State rule, life went on in Mosul and other areas controlled by the militants: people married, had children, divorced and died.

Outside the portacabin court, displaced Iraqis clutch Islamic State documents as proof not only of their rites of passage, but also of the sophisticated bureaucracy the militants ran in their ambition to create a state for all Muslims.

“We don’t recognise Daesh (Islamic State) procedures,” said judge Khalid al-Shammari, his suit and tie incongruous with the spartan portacabin in which he sits.

“We are emergency judges, like you have emergency doctors. These are exceptional circumstances.”

IDENTITY CHALLENGE

Untangling Islamic State’s bureaucratic legacy is proving complex though.

Even proving identities is complicated by the fact most of those displaced by the fighting don’t have national ID cards because the authorities in the Kurdish region where the camp is located have taken them away for security purposes.

Divorces pose a particular challenge as Iraqi law demands that both wife and husband be present to terminate a marriage. But couples who separated while under Islamic State rule often end up fleeing in different directions.

“Sometimes one is liberated and the other is still in an area controlled by Islamic State,” judge Shammari said.

The procedures for registering deaths are particularly stringent to prevent people taking advantage of the chaos to fake their own deaths so they can escape justice, or claim inheritances before time, the judge said.

Marwa Salem is running up against those obstacles as she tries to register the death of her father, who she said was killed by Islamic State for cooperating with the Kurdish security services.

The militants dumped his body on the outskirts of the village where they lived near Mosul and gave his family a receipt for his death.

Before his death can be recognised by the Iraqi authorities, she must take the case to another court that deals with terrorism cases in a different city, but people staying in the camp are not permitted to leave for now.

THE ONLY WAY

Some people converting their documents in the makeshift court had initially tried to skirt Islamic State’s bureaucracy but ended up having to comply.

Abu al-Abbas, 22, got married shortly after Mosul fell but instead of going to an Islamic State court he arranged for a cleric to preside over the wedding ceremony.

His neighbour also circumvented Islamic State procedures, but was found out and flogged by the militants as punishment.

Fearful of being discovered himself, Abu al-Abbas said he then went to an Islamic State court where a judge tested his knowledge of Islam before signing off on the marriage.

“Their way was the only way,” Abu al-Abbas said, lining up outside a portacabin to register his marriage yet again.

The process is basic, with clerks using pen and paper rather than digital databases. In one cabin, staff enter details in a notebook which has the word “computer” written on the front.

The judges and their staff hope they will soon be able to return to Mosul as Iraqi forces advance.

“In Mosul we had everything but here we are in a caravan,” said a legal assistant, laboriously transcribing personal details from a stack of forms into a ledger.

Two non-governmental organisations - Qandil, a Swedish group that works mainly in Iraq’s autonomous Kurdistan region, and the Norwegian Refugee Council - are helping with the process.

Couples registering marriages first have their fingerprints taken. Then they are called into another portacabin where a judge, seated behind a plastic table with two witnesses present, asks for their dates of birth, when they married and the value of the dowry paid to the wife.

The couples step out into the camp and wait for their Iraqi documents to be processed, ripping up their Islamic State certificates as they go.