TEL KAIF, Iraq -- The crime scene was Stall No. 200 in a market eight miles north of Mosul, Iraq.
It was there that Zaid Imad Khalaf, 24, made a living selling chickens, scraping by next to a grocer who sold onions by the kilogram and a trader who sold flour by the scoop.
And it was there that an Islamic State soldier, one of the thousands who ruled the plains of northern Iraq, walked by and pointed to Mr. Imad's plumpest chicken. "That one," he said.
Mr. Imad butchered the bird, plucked it, weighed it and then asked for the 8,000 dinars he was owed, around $7. That's when the problems started. "When he went to pull the money from his pocket he said that he only had 4,000 dinars and said he would pay me the rest tomorrow," Mr. Imad recalled.
Normally, the story should have ended there, with a poor man being stiffed by a more powerful one.
And yet a week after the incident in 2016, Mr. Imad did something that might seem foolhardy when the rulers of your city have a reputation for unbridled brutality: He lodged a complaint for the missing $3.50 with the town's Islamic Police station. The next day, the Islamic State fighter hurried in to pay the amount he owed.
It was a quick, neat and efficient resolution to the pettiest of problems, one which probably would have gone unheeded before the arrival of the militants.
In a terrorist version of the "broken window" school of policing, the Islamic State aggressively prosecuted minor crimes in the communities it took over, winning points with residents who were used to having to pay bribes to secure police help.
Nearly 400 records and investigation files abandoned in one Islamic State police station and provided to The New York Times suggest that local residents turned to the group for help with the most minor problems.
There was the shopkeeper who reported a customer for failing to pay for half a bag of sugar, the homeowner who wanted compensation for a bad painting job and the man upset that an acquaintance had hit him with a shoe.
The documents show that the Islamic State, also known as ISIS, was willing -- even eager -- to get involved in the messy details of people's day-to-day lives, and conversely that hundreds of people trusted them to fairly resolve their issues, no matter how trivial.
With the Islamic State's territory reduced to a fraction of what it once was, the world's attention has moved on. Yet the records shed light on how the group managed to hold onto so much land in the first place. And with ISIS still in control of approximately 1,000 square miles in Iraq and Syria, they may also offer lessons about the battles ahead.
The records are contained in hundreds of files recovered from a cluster of buildings in the northern Iraqi town of Tel Kaif, which had housed the group's Shorta Islamiya -- its Islamic police force. Most of the papers were discovered by Iraqi security forces who liberated the area in early 2017. They in turn handed them over to The New York Times, so that their contents could be shared with the world.
Grocers, convenience store owners and traders who sold their goods on credit turned to the Islamic State government when customers failed to pay. They sought reimbursement for a cow, a bird, meat, wheat, vegetables, an oil change and a heater. One filed a report for the 150 meters of electrical wire he hadn't been compensated for.
Farmers asked for investigations into the crops damaged by livestock. One sought compensation for the watermelons trampled by an errant sheep. Another said his newly planted field had been kicked up by a total of 21 cows. Yet another reported a shepherd who, he said, allowed his flock to graze on his land seven different times. "Each time, I forgive him and he says he won't do it again, and then he does," he lamented in the report.
The records in the ornate folder below detail the case of 30 stolen sheep.
At times, the reports read like the police blotter in any small town. There were car crashes, burglaries, men who threw punches, and cash stolen from one woman's purse after she left it in an unlocked car.
More often than not, the police station fielded neighborhood disputes that were remarkable for their picayune character. Sometimes, they veered into inanity.
One father came to complain that a neighbor's child had kicked his son. (He underlined that the child doing the kicking was bigger than the child being kicked.) Another accused an acquaintance of calling him a "pimp." Yet another came to file a complaint because he had been called a "shoe."
Justice was swift and efficient, mostly because no one wanted to risk punishment at the hands of the militants. Yet the fact that hundreds of civilians filed complaints, including against ISIS fighters who had wronged them, suggests that at least some Iraqis believed the terrorist group would do right by them.
Even residents who suffered abuses at the hands of the militants gave them points for their policing, saying that for nonreligious disputes, they were not only fair but also willing to wade into problems that might have been brushed off by most authorities.
Would the Iraqi government have pursued the case of a stolen chicken?
"They wouldn't have even heard this complaint because it was only for 4,000," or $3.50, said Mr. Imad's younger brother, Alosh Imad. "You have to have wasta -- a connection to someone," for the police to take your case under consideration, he explained. "As far as justice was concerned," he said, "ISIS was better than the government."
Frustrated at being repeatedly brushed off by the fighter, who surely by now had eaten his plumpest bird, Mr. Imad, the chicken seller, padlocked his stall, changed into fresh clothes and headed to the Islamic State police station on Al Bareed Street.
The procedure for filing a complaint involved several steps, and each step involved its own paperwork, the voluminous remnants of which were found at the old station.
The police station was housed in a square room, 20 feet by 20 feet.
The police chief faced Mr. Imad across a large desk. Under the circling of a Chinese-made plastic fan that sliced the thick air, he heard Mr. Imad's complaint. Then he pulled out a form bearing the terrorist group's name and, in the field labeled "Case Number," jotted down: 329.
Then, in blue ink, he filled in the date -- Jan. 22, 2016, Sunday, 10 a.m. -- before writing down the details of the claim in neat script: "The complainant (Zaid Imad Khalaf) complains that the respondent (Bariq) owes him (4,000 Iraqi dinars) after selling him a chicken."
Then he pulled out another form, this one a summons. It ordered the ISIS fighter to report to the precinct. "Warning: In the event you do not show up, necessary steps will be taken to punish you," it said. The police chief then dispatched one of his agents on a scooter, Mr. Imad said, to deliver the summons.
The fighter showed up the next day and immediately paid up, according to a receipt (below).
"In the name of Allah, the Most Merciful, the Most Gracious," the statement begins. The police officer then filled in the blanks on the form: "An amount (4,000 IQD) was received from (Bariq Sibhan Younis) to be paid to (Zaid Imad Khalaf)," it said. "Remaining amount is zero."
Both parties signed the form and put their fingerprints on it, dipping their index fingers into bright purple ink, a gesture that aped one of the bureaucratic procedures of the Iraqi government.
To ascertain the authenticity of the documents, The Times showed a cross section of them to six independent analysts who study the Islamic State, including Mara Revkin of Yale University; Aymenn Jawad al-Tamimi of the Middle East Forum; and a team from West Point's Combating Terrorism Center.
One Tel Kaif resident, Abdulwahid Abdalla, described being on the receiving end of a complaint handled by the militants.
Mr. Abdalla said he had owed his cousin about $145 for the transportation services the cousin provided to help him move some heavy materials. He had managed to pay off half but then stopped making payments because he ran out of money, he said. To his surprise, his cousin lodged a complaint against him.
The Islamic State gave him a deadline. They didn't care if he didn't have the money, he said, and instructed him to sell something to come up with it. So Mr. Abdalla, a carpenter, sold some beams he had been saving for a construction job at a loss.
"For a while, I was angry at my cousin," Mr. Abdalla said, though he acknowledged that if it had not been for the militants, he might never have paid back what he owed.
When the dispute involved one party insulting or harming another, the Islamic State played a role not unlike that of a school principal asking an unruly pupil to apologize.
Case No. 393, for example, involved three shepherds who beat a farmer after he asked them to stop their sheep from trampling his crops. The three signed a statement saying: "I will not attack my Muslim brother Ahmed Mohammed Qadir and I will not swear at him. I will not let my sheep enter lands belonging to Muslims."
And to make sure that the resolution had teeth, there was also an implicit threat: "In the event I do not keep my promise," the form reads, "I expect to face any and all legal sanctions and punishments" -- which meant only one thing in ISIS-controlled Iraq.
Winning Friends and Influencing People
One of the Islamic State's first priorities when capturing a new area was to win the trust and cooperation of the civilians, whose labor and good will were essential to their state, said Ms. Revkin, the Yale researcher. Among the ways it did this was by providing swift justice, which is one of the most basic functions of any state -- and one that was sorely lacking under Iraq's government.
"ISIS seemed to recognize early on that it could exploit local demands for dignity by listening to people's complaints and problems and offering some fast solutions," said Ms. Revkin, who has interviewed more than 200 people who lived in ISIS-controlled areas.
Now in prison, the "emir" of the police station in the village of Sahaji, which had jurisdiction over an 11-mile stretch northwest of Mosul, confirmed that the militants' goal was to try to win over the population. In a jailhouse interview in northern Iraq, where he spoke with his hands in handcuffs while a guard looked on, he recalled how he had aggressively investigated the case of a shopkeeper who had been owed the equivalent of $4.25.
"If we succeeded in delivering justice, we knew we would win the hearts of the people," he explained.
As word spread, residents began showing up with complaints about unpaid loans and services dating to well before ISIS came to power. Among them was a complaint for an unpaid bill of $119 from 2010 -- or four years before ISIS planted its flag in Tel Kaif. "He has been asking for his money during that period, but the respondent was stalling and delaying until now," the filing says.
There was also a three-year-old debt of $340 for electricity, a claim for $298 for a three-year-old window installation, a three-year-old unpaid meat bill of $170 and two-year-old claims for $2,115 for vegetables.
In his store on a ribbon of asphalt not far from the police station, Ahmed Ramzi Salim keeps a register of the money owed to him. Customers regularly asked for credit to buy the eggs he sells from an open tray, the rice and flour he sells by the scoop and a deodorant spray called Fresh Time.
Mr. Salim, a stocky, rosy-faced 26-year-old, said he filed three complaints in the time ISIS ruled the town, one of which was recovered in the files left behind in the police station. Before the militants took over, he recalled, he struggled for over a year to get the $136 owed him by a butcher who frequented his convenience store. "It was as if I was begging him," he said.
As soon as the Islamic State got involved, the problem disappeared. The man showed up four days later to pay back what was owed.
"It was efficient, because people were afraid of them," Mr. Salim said. "If you hear you've been summoned to the ISIS police station, you'll do everything to avoid that."
Prosecuting Their Own
"This case was transferred to the court," the police officer scribbled in the margin of Case No. 407, a complaint lodged by a woman who said her husband had beaten her in public.
While a majority of the cases were settled inside the police station, the records show that those the group deemed to be the most severe were sent to an Islamic tribunal.
The 87 carbon-copied, prison transfer records found in the police station are an archive of religious zeal. Citizens were thrown in jail for shaving their beards and for more obscure transgressions, like eyebrow plucking.
Men were locked up for sitting too close to a woman, for being found alone with a woman, for wearing tight clothes and even for disobeying their parents. Several were charged with mocking or slandering the Islamic State.
And then there was the case of the unfortunate individual named in Prison Transfer Order No. 001646, who was charged with six offenses at once. The form says he was arrested in 2016 for smoking, playing cards, playing dominoes and smoking a hookah, as well as either watching or possessing pornographic videos and songs. (The form fails to clarify if he was doing all of these things at once or if he partook in these assorted activities over a period of time.)
If the ISIS system of justice worked, it was because it was authoritarian. Severe and unyielding, it compelled obedience in ways that an ordinary, law-abiding society cannot.
Allegations of corruption and wrongdoing by the militants are not hard to come by. But harsh and rigid as the Islamic State was, it did provide certain rights to citizens -- and they were willing to prosecute their own.
Several of the complaints recovered at the Tel Kaif police station were filed against ISIS members. The most surprising may be Case No. 494, which involved an allegation of torture against a policeman working at the very police station where the grievance was recorded.
According to the complaint, Ihab Mohammed Yasin was hanging out with his friends when a militant accosted the group and wrongly accused them of smuggling cigarettes. "He asked us to take out our cigarettes. I told him that I don't have any cigarettes. He took us to their station," the victim wrote, adding, "He hit me in the face and all over my body with a rubber hose."
The outcome of the case was not recorded in the papers we recovered, but the fact that it was filed at all is telling. "If civilians were universally distrustful and afraid of ISIS authorities, then no one would ever file a complaint against an ISIS member for fear of retaliation," Ms. Revkin, the Yale researcher, said.
Reading through the records, one has to wonder if at a certain point the Lilliputian character of some of the cases began trying the patience of even the terrorist group's appointed administrator as he sat under the lapping blades of the Chinese fan, dispensing justice.
There was Case No. 436, involving a customer who bought half a bag of sugar at a local supermarket, only to try to return it the next day after he found a cheaper distributor.
There was Case No. 499, filed by a man whose neighbor cut the electricity wire running to his house after discovering his cow dead next to a downed line. "Now I don't have electricity in my house," the complainant wrote.
Did Case No. 167, filed by an employee of a health clinic, prompt a face-palm from the policeman who recorded it? The summary states that every day on his walk to work, the employee politely greeted a sidewalk cooking-gas vendor. Then one day, everything changed.
"When I was going to work, I said 'Hi' to him, and he replied with 'Hello, thief,'" the complainant wrote. "I told him: 'Why do you call me a thief? What did I steal from you?' " That's when the vendor started to hit him, the clinic worker claimed.
Or the man in Case No. 430, who had a disagreement with an acquaintance.
"This incident happened 20 days ago," the victim explained, "and after that incident, every time I pass in front of him, he spits on the ground."
He sought the help of the world's most feared terrorist group because of that grave offense.
Like every other complaint, it was neatly filled out, with a date and time, and assigned a case number, before being placed in a plastic sleeve for safekeeping.
Reporting was contributed by Falih Hassan from Baghdad; Alaa Mohammed from Mosul; Muhammad Nashat Mahmud and Mohammed Sardar Jasim from Erbil; and Abduljabbar Yousif from New York.