Documents from ISIL-held areas in Iraq have shed light on the armed group's tough rules of internal governance and the fate awaiting fighters who violated its code of conducts and laws.

Obtained by Al Jazeera, the files also provide further evidence about the Islamic State of Iraq and Levant's structure and level of organisation.

The documents were seized from al-Baaj district west of Mosul, Iraq's second-biggest city, following its capture by Iraqi forces in June.

One of them, which bears the logo of ISIL's "Authorised Committee", directs all of the group's governing structures in areas they controlled to punish those who fled or attempted to escape the fighting with Iraqi forces.

It also instructs ISIL, also known as ISIS, fighters to turn anyone they capture over to the group's "military court" and "army intelligence".

Hassan Abu Haniyeh, a Jordanian expert on armed groups in the Middle East, told Al Jazeera that the courts would mostly hand down death sentences because most of the violations had to do with fighters refusing to take part in a battle, or requesting to leave the group to go back to their country of origins.

Other documents provided to Al Jazeera were files of ISIL's police personnel who were caught violating ISIL's code of conduct and laws.

The files contained the names, nationalities and pictures of police officers arrested for cases such as drinking alcohol, sexually molesting children, stealing and blasphemy.

Stealing would typically be punished by cutting off a hand, while drinking alcohol would result in lashes and imprisonment, according to Abu Haniyeh.

If a fighter was caught molesting children, the penalty would be several dozen lashes and jail time, he added.

But if there was a homosexual relationship between two consenting males, the punishment for that would be death by being thrown from a tall building.

Other files are related to ISIL fighters who either refused to fight or wanted to return to their countries of origin. Most of them had French, Swiss and Belgian nationalities; others were from Balkan countries.

Launched last year, ISIL's "Authorised Committee" is akin to an executive council tasked to run the group's day-to-day operations in the absence of leadership figures who were either killed, captured or fled during the major push by Iraqi forces to retake territory lost to the group in 2014.

Abu Haniyeh said ISIL restructuring over the past two years revealed specific traits of a fascist movement.

"Despite having archaic Islamic labels to its structures, ISIL's organisational charts are more related to Nazi or Fascist groups than anything else," he said.

"Every decision-making process made within ISIL's structure has to go through its intelligence-security apparatus which has control over everything else, including religious matters," he added.

The current head of the "Authorised Committee" is Jordanian Abu Abdel Rahman al-Shami, according to analysts.

ISIL has met a series of defeats in Syria and Iraq after it made major advances across the two countries four years ago and declared its aim to build a caliphate.

Last month, Iraqi Prime Minister Haider al-Abadi announced the recapture of the town of Hawija, one of ISIL's last stronghold in Iraq.

The Syrian Democratic Forces, an alliance of Kurdish and Arab opposition forces backed by the United States, pushed the armed group out of its de facto capital, Raqqa, in Syria.

Follow Ali Younes on twitter @ali_reports