ZARQA/SHURA, Iraq (Reuters) - After Islamic State conquered villages in northern Iraq, it spelled out in minute detail the rules of its self-proclaimed caliphate, from beard length to alms to guidelines for taking women as sex slaves.

An Iraqi soldier shows a pamphlet which reads "Wearing beards is compulsory, shaving is prohibited" along a street of the town of al-Shura, which was recaptured from Islamic State (IS) on Saturday, south of Mosul, Iraq October 30, 2016. REUTERS/Zohra Bensemra/File Photo

Islamic State documents and posters, obtained in villages captured by Iraqi forces, highlight a tight and comprehensive system of rule by the militants, who went to great lengths to explain their extremist philosophy.

The documents and other materials, printed with Islamic State logos, were found by Reuters in offices used by the group until a few days ago. Members of the Iraqi forces told Reuters the documents originated from Islamic State, although this could not be independently verified.

Iraqi security forces and Kurdish peshmerga fighters have seized several villages and towns during an offensive against the northern city of Mosul, Islamic State’s last stronghold in the country.

When Islamic State swept through the north in 2014, it announced a self-proclaimed caliphate, which appealed to some fellow Sunnis who felt marginalized by the Shi’ite-led central government.

But that appeal faded as Islamic State enforced its medieval thinking with brute force, beheading anyone deemed an opponent.

Slick, colorful posters, pamphlets and documents highlight Islamic State’s intense focus on dictating what it called proper Islamic behavior for the citizens of its caliphate.

Violations of its rules meant punishment such as public whipping or being hauled off to Mosul for execution, according to several villagers who recently escaped from Islamic State areas.

A green wallet-size insert lays out guidelines for how to pray properly. It shows a young boy undertaking ablutions. “Wash your feet from the direction of your toes down to your heels,” it said.

GOLD BRACELETS

A five-page pamphlet with pictures of gold bracelets, diamond rings and wheat on the front spelled out instructions on how to give alms, an obligation under Islam. Failure to do so would mean a penalty.

In the village of Shura, where seven Islamic State suicide bombers were recently shot dead as they rushed toward Iraqi forces, militants kept meticulous records of who had given alms. Entries showed whether an individual owned gold, property or a car. Monthly salaries were also noted.

Unlike al Qaeda, its predecessor in Iraq, Islamic State made its name in the jihadi world by becoming the first militant group to capture significant amounts of land in the Middle East, hold it and then set up an administration.

But air strikes by a U.S.-led coalition targeting Islamic State’s leaders and its sources of income have dealt a major blow to the caliphate.

Islamic State’s inclination to codify its system of rule extended to what it called the spoils of war.

A pink and red pamphlet includes 32 questions and answers on how to deal with female captives.

A senior Islamic State cleric has the authority to distribute female captives among its fighters, it said.

“Non-Muslim women can be taken as concubines,” according to the leaflet.

Militants can own two sisters as concubines but only have sex with one.

“Pre-pubescent girls can be taken as concubines. You cannot have penetrative sex but you can still enjoy them,” the leaflet added.

One question in the pamphlet asks whether a group of militants can share a concubine. The answer: only a single owner can sleep with a concubine.

After blazing through northern Iraq, Islamic State took hundreds of women from the Yazidi minority as sex slaves.

Under Islamic State’s rules, women were required to largely stay at home or wear head-to-toe black coverings if they ventured out. Men wore short pants which were deemed Islamic along with beards of appropriate length.

One of the pamphlets begins by defining a beard as “hair that grows on your face and your cheeks”.

There were few forms of entertainment under Islamic State, which banned the internet and music along with cell phones.

A ban on satellite dishes deprived Iraqis of news of the outside world. In a huge slick poster, entitled “Why I Should Destroy My Dish”, the jihadists provided 20 reasons, revolving mostly around the immorality of satellite television programs.

Reason 8: “Because satellite channels show stories of love and naked women and inappropriate language.”

Reason 10: “Because satellite channels normalize men being effeminate and sissies.”