He packed his bag with his most treasured possessions before going to bed: the 1 terabyte hard drive with his evidence against the Islamic State group, an orange notebook half-filled with notes on Ottoman history, and, a keepsake, the first book from Amazon delivered to Mosul.

He passed the night in despair, imagining all the ways he could die, and the moment he would leave his mother and his city.

He had spent nearly his entire life in this home, with his five brothers and five sisters. He woke his mother in her bedroom on the ground floor.

“I am leaving,” he said. “Where?” she asked. “I am leaving,” was all he could say. He couldn’t endanger her by telling her anything more. In truth, since the IS had invaded his city, he’d lived a life about which she was totally unaware.

He felt her eyes on the back of his neck, and headed to the waiting Chevrolet. He didn’t look back.

For nearly two years, he’d wandered the streets of occupied Mosul, chatting with shopkeepers and Islamic State fighters, visiting friends who worked at the hospital, swapping scraps of information. He grew out his hair and his beard and wore the shortened trousers required by IS. He forced himself to witness the beheadings and deaths by stoning, so he could hear the killers call out the names of the condemned and their supposed crimes.

He wasn’t a spy. He was an undercover historian and blogger . As IS turned the city he loved into a fundamentalist bastion, he decided he would show the world how the extremists had distorted its true nature, how they were trying to rewrite the past and forge a brutal Sunni-only future for a city that had once welcomed many faiths.

He knew that if he was caught he too would be executed.

“I am writing this for the history , because I know this will end. People will return, life will go back to normal,” is how he explained the blog that was his conduit to the citizens of Mosul and the world beyond. “After many years, there will be people who will study what happened. The city deserves to have something written to defend the city and tell the truth, because they say that when the war begins, the first victim is the truth.”

He called himself Mosul Eye . He made a promise to himself in those first few days: Trust no one, document everything.

Neither family, friends nor the Islamic State group could identify him. His readership grew by the thousands every month.

And now, he was running for his life.

But it would mean passing through one Islamic State checkpoint after another, on the odds that the extremists wouldn’t stop him, wouldn’t find the hard drive that contained evidence of IS atrocities, the names of its collaborators and fighters, and all the evidence that its bearer was the man they’d been trying to silence since they first swept in.

The weight of months and years of anonymity were crushing him.

He missed his name.

___

From the beginning, Mosul Eye wrote simultaneously as a witness and a historian. Born in the midst of the Iran-Iraq war in 1986, he had come of age during a second war, when Saddam Hussein fell and the Americans took over. At 17, he remembers going to a meeting of extremists at the mosque and hearing them talk about fighting the crusaders. “I should be honest, I didn’t understand.”

As for the Americans, whose language he already spoke haltingly, he couldn’t fathom why they would come all the way from the United States to Mosul. He thought studying history would give him the answers.

The men in black came from the north, cutting across his neighborhood in brand new trucks, the best all-terrain Toyotas money could buy. He had seen jihadis before in Mosul and at first figured these men would fade away like the rest. But in the midst of pitched fighting, the extremists found the time to run down about 70 assassination targets and kill them all, hanging enormous banners announcing their arrival in June 2014.

By then a newly minted teacher, the historian attended a staff meeting at Mosul University, where the conquerors explained the Islamic State education system, how all classes would be based upon the strictest interpretation of the Quran. To a man who had been accused of secularism during his master’s thesis defense just the year before, it felt like the end of his career.

In those first few days, he wrote observations about the Islamic State group on his personal Facebook page — until a friend warned that he risked being killed. With the smell of battle still in the air, he wandered the streets, puzzling over its transformation into a city at war. He returned to find his family weeping. The smell of smoke and gunfire permeated the home.

“My job as a historian requires an unbiased approach which I am going to adhere to and keep my personal opinion to myself,” he wrote. “I will only communicate the facts I see.”

By day, he chatted with Islamic State fighters and vendors, and observed. Always observed. By night, he wrote in his native Arabic and fluent English on a WordPress blog and later on Facebook and Twitter.

The city turned dark, and Mosul Eye became one of the outside world’s main sources of news about the Islamic State fighters, their atrocities and their transformation of the city into a grotesque shadow of itself. The things IS wanted kept secret went to the heart of its brutal rule.

“They were organized as a killing machine. They are thirsty (for) blood and money and women.”

He attended Friday sermons with feigned enthusiasm. He collected and posted propaganda leaflets, including one on July 27, 2014, that claimed the Islamic State leader was a descendent of the Prophet Mohammed’s daughter. Back home, writing on his blog in his other, secret identity, he decried the leaflet as a blatant attempt “to distort history” to justify the fanatics’ actions.

He drank glass after glass of tea at the hospital, talking to people who worked there. Much of the information he collected went up online. Other details he kept in his computer, for fear they would give away his identity. Someday, he told himself, he would write Mosul’s history using these documents.

The most sensitive information initially came from two old friends: one a doctor and the other a high school dropout who embraced Islamic State’s extreme interpretation of religion. He was a taxi driver who like many others in Mosul had been detained by a Shiite militia in 2008 and still burned with resentment. He swiftly joined an intelligence unit in Mosul, becoming “one of the monsters of ISIS” — and couldn’t resist bragging about his insider knowledge.

Once he corroborated the details and masked the sources, Mosul Eye put it out for the world to see. He sometimes included photos of the fighters and commanders, complete with biographies pieced together over days of surreptitious gathering of bits and pieces of information during the course of his normal life — that of an out-of-work scholar living at home with his family.

“I used the two characters, the two personalities to serve each other,” he said. He would chat up market vendors and bored checkpoint guards for new leads.

He took on other identities as well on Facebook. Although the names were clearly fake, the characters started to take on a life of their own. One was named Mouris Milton whom he came to believe was an even better version of himself — funny, knowledgeable. Another was Ibn al-Athir al-Mawsilli, a coldly logical historian.

International media picked up on Mosul Eye from the first days, starting with an online question-and-answer with a German newspaper. The anonymous writer gave periodic written interviews in English over the years. Sometimes, journalists quoted his blog and called it an interview. In October 2016, he spoke by phone with the New Yorker for a profile but still kept his identity masked.

Intelligence agencies made contact as well and he rebuffed them each time.

“I am not a spy or a journalist,” he would say. “I tell them this: If you want the information, it’s published and it’s public for free. Take it.”

First the Islamic State group compiled lists of women accused of prostitution, he said, stoning or shooting around 500 in the initial months. Then it went after men accused of being gay, flinging them off tall buildings. Shiites, Christians and Yazidis fled from a city once proud of its multiple religious.

When the only Mosul residents left were fellow Sunnis, they too were not spared, according to the catalog of horrors that is Mosul Eye’s daily report. He detailed the deaths and whippings, for spying and apostasy, for failing to attend prayers, for overdue taxes. The blog attracted the attention of the fanatics, who posted death threats in the comments section.

___

Less than a year into their rule, in March 2015, he nearly cracked. IS executed a 14-year-old in front of a crowd; 12 people were arrested for selling and smoking cigarettes, and some of them flogged publicly. Seeing few alternatives, young men from Mosul were joining up by the dozens.

The sight of a fanatic severing the hand of a child accused of stealing unmoored him. The man told the boy that his hand was a gift of repentance to God before serenely slicing it away.

It was too much.

Mosul Eye was done. He defied the dress requirements, cut his hair short, shaved his beard and pulled on a bright red crewneck sweater. He persuaded his closest friend to join him.

“I decided to die.”

The sun shining, they drove to the banks of the Tigris blasting forbidden music from the car. They spread a scrap of rug over a stone outcropping and shared a carafe of tea. Mosul Eye lit a cigarette, heedless of a handful of other people picnicking nearby.

“I was so tired of worrying about myself, my family, my brothers. I am not alive to worry, but I am alive to live this life. I thought: I am done.”

He planned it as a sort of last supper, a final joyful day to end all days. He assumed he would be spotted, arrested, tortured. The tea was the best he had ever tasted.

Somehow, incredibly, his crimes went unnoticed.

He went home.

“At that moment I felt like I was given a new life.”

He grew out his hair and beard again, put the shortened trousers back on. And, for the remainder of his time in Mosul, smoked and listened to music in his room with the curtains drawn and the lights off. His computer screen and the tip of his cigarette glowed as he wrote in the dark.

The next month, he slipped up.

His friend the ex-taxi driver told him about an airstrike that had just killed multiple high-level Islamic State commanders, destroying a giant weapons cache. Elated, Mosul Eye dashed home to post it online. He hit “publish” and then, minutes later, realized his mistake. The information could have come from only one person. He trashed the post and spent a sleepless night.

“It’s like a death game and one mistake could finish your life.”

For a week, he went dark. Then he invited his friend to meet at a restaurant. They ate spicy chicken, an unemployed teacher and the gun-toting ex-taxi driver talking again about their city and their lives. His cover was not blown.

The historian went back online. Alongside the blog, he kept meticulous records — information too dangerous to share.

His computer hard drive filled with death, filed according to date, cause of death, perpetrator, neighborhood and ethnicity. Accompanying each spreadsheet entry was a separate file with observations from each day.

“ISIS is forcing abortions and tubal ligation surgeries on Yazidi women,” he wrote in unpublished notes from January 2015. A doctor told him there had been between 50 and 60 forced abortions and a dozen Yazidi girls younger than 15 died of injuries from repeated rapes.

April 19, 2015: “The forensics department received the bodies of 23 ISIS militants killed in Baiji. They had no shrapnel, no bullets, no explosives and the cause of death does not seem to be explosion. It is like nothing happened to the bodies. A medical source believes they were exposed to poison gas.”

July 7, 2015: “43 citizens were executed in different places, this time by gunfire, which is unusual because they were previously beheadings. A source inside ISIS said that 13 of those who were executed are fighters and they tried to flee ..”

He noted a flurry of security on days when the Islamic State leader, Abu Bakr al-Baghdadi, seemed to be in town.

Many in Iraq, especially those who supported the Shiite-dominated leadership in Baghdad, blamed Mosul for its own fate. Mosul Eye freely acknowledged that some residents at first believed the new conquerors could only be an improvement over the heavy-handed government and the soldiers who fled with hardly a backward glance at the city they were supposed to defend.

But he also wrote publicly and privately — of the suffering among citizens who refused to join the group. He was fighting on two fronts: “One against ISIS, and the other against the rumors. Trying to protect the face of Mosul, the soul of Mosul.”

He tested out different voices, implying one day that he was Christian, another that he was Muslim. Sometimes he indicated he was gone, other times that he was still in the city. “I couldn’t trust anyone,” he said.

In his mind, he left Mosul a thousand times, but always found reasons to stay: his mother, his nieces and nephews, his mission.

But finally, he had to go.

“I had to run away with the proof that will protect Mosul for years to come, and to at least be loyal to the people who were killed in the city.”

And he did not want to become another casualty of the monsters.

“I think I deserve life, deserve to be alive.”

A smuggler, persuaded by $1,000 and the assurances of a mutual acquaintance, agreed to get him out. He was leaving the next day. Mosul Eye had no time to reflect, no time to change his mind.

He returned home and began transferring the contents of his computer to the hard drive. He pulled out the orange notebook with the hand-drawn map of Mosul on the cover and the outlines of what he hoped would one day be his doctoral dissertation. Into the bag went “Father Bombo’s Pilgrimage to Mecca,” an obscure American satirical novel from 1770 that he had ordered from Amazon via a new shop that was the only place in town to order from abroad online.

It was time to leave.

He wanted to make sure his mother would never have to watch the capture and killing of Mosul Eye.

On Dec. 15, 2015 he left Mosul, driving with the smuggler to the outskirts of Raqqa, a pickup point that alarmed him. From there he and other Iraqis and Syrians were picked up by a second set of smugglers and driven by convoy to Turkey.

They had no trouble crossing the border.

__

In Turkey, Mosul Eye kept at it: via WhatsApp and Viber, from Facebook messages and long conversations with friends and relatives who had contacts within IS. From hundreds of kilometers away, his life remained consumed by events in Mosul.

By mid-2016, deaths were piling up faster than he could document. The IS and airstrikes were taking a bloody toll on residents. His records grew haphazard, and he turned to Twitter to document the atrocities. In February 2017, he received asylum in Europe with the aid of an organization that learned his backstory. He continued to track the airstrikes and Islamic State killings

He mapped the airstrikes as they closed in on his family, pleading with his older brother to leave his home in West Mosul. Ahmed, 36, died days later when shrapnel from a mortar strike pierced his heart, leaving behind four young children.

It was only then that Mosul Eye revealed his secret to a younger brother — who was proud to learn the anonymous historian he had been reading for so long was his brother.

“People in Mosul had lost hope and confidence in politicians, in everything,” his brother said. Mosul Eye “managed to show that it’s possible to change the situation in the city and bring it back to life.”

As the Old City crumbled, Mosul Eye sent coordinates and phone numbers for homes filled with civilians to a BBC journalist who was covering the battle, trying to get the attention of someone in the coalition command. He believes he saved lives.

Then, with his beloved Old City destroyed, Mosul Eye launched a fundraiser to rebuild the city’s libraries because the extremists had burned all the books. None of his volunteers knew his identity.

An activist who helped co-found a ‘Women of Mosul’ Facebook group with Mosul Eye describes him as a “spiritual leader” for the city’s secular-minded.

“He was telling us about the day-to-day events under ISIS and we were following closely with excitement as if we were watching a movie. Sometimes he went through hard times and we used to encourage him. He won the people’s trust and we became very curious to know his real personality,” said the activist, who spoke on condition of anonymity because she believed she was still in danger.

From a distance, finally writing his dissertation on 19th century Mosul history in the safety of a European city, he continued to write as Mosul Eye and organize cultural events and fundraisers from afar — even after Mosul was liberated.

The double life consumed him, sapped energy he’d rather use for the doctoral dissertation and for helping Mosul rebuild. And it hurt when someone asked the young Iraqi why he didn’t do more to help his people. He desperately wanted his mother to know all that he had done.

He felt barely real, with so many people knowing him by false identities: 293,000 followers on Facebook, 37,000 on WordPress and 23,400 on Twitter.

In hours of conversation with The Associated Press, he agonized over when and how to end the anonymity that plagued him. He did not want to be a virtual character anymore.

On Nov. 15, 2017, Mosul Eye made his decision.

“I can’t be anonymous anymore. This is to say that I defeated ISIS. You can see me now, and you can know me now.”