I don’t often recommend books; I figure that what you read is your business. But I can’t help thinking that everyone should read “Guantánamo Diary,” the newly published memoir by Mohamedou Ould Slahi, a forty-four-year-old man who is, right now, a prisoner at Guantánamo Bay. Slahi, a Mauritanian computer technician, was summoned to a local police station in November of 2001; thinking he’d be back by the end of the day, he drove there in his own car. Instead, the C.I.A. flew him to Jordan, then to Afghanistan, and finally to Guantánamo, where he’s been ever since. In 2010, citing the government’s failure to charge him with any crime, a federal judge ordered Slahi released. But the Obama Administration appealed that order, and he remains in custody. Slahi is still living in the same room—a small, free-standing prison hut—in which he wrote “Guantánamo Diary,” in 2005, before passing it to his lawyers. (The book has been slow to appear in part because, for a long time, it was classified; eventually, so much information about his case entered the public record that government lawyers could no longer argue that it needed to be kept secret. Even so, the published version is full of redactions.)

The big surprise about Slahi’s book—the thing that almost no one could have foreseen—is that, in addition to being appalling and sad, it’s funny. Earlier this week, when about a hundred and fifty people crammed into Theatre 80, in the East Village, to hear assorted luminaries read from it, the diary’s tone—friendly, exasperated, curious, and ironic—seemed to have put everyone on a first-name basis with “Mohamedou.” (The reading was organized by the the PEN America Center and the A.C.L.U.) Molly Crabapple, an artist who has drawn scenes from Syria and Guantánamo for the Times and Vanity Fair, read a passage that was typical in its mix of light and dark:

As promised, [REDACTED] pulled me early in the day. Lonely in my cell, I was terrified when I heard the guards carrying the heavy chains and shouting at my door . … My heart started to pound heavily because I always expected the worst. But the fact that I wasn’t allowed to see the light made me “enjoy” the short trip between my freakin’ cold cell and the interrogation room. It was just a blessing when the warm GTMO sun hit me. I felt life sneaking back into every inch of my body. I would always get this fake happiness, though only for a very short time. It’s like taking narcotics.

“How you been?” said one of the Puerto Rican escorting guards in his weak English.

“I’m OK, thanks, and you?”

“No worry, you gonna back to your family,” he said. When he said that I couldn’t help breaking in [REDACTED]. Lately, I’d become so vulnerable. What was wrong with me? Just one soothing word in this ocean of agony was enough to make me cry. [REDACTED] we had a complete Puerto Rican division. They were different than other Americans; they were not as vigilant and unfriendly. Sometimes, they took detainees to shower [REDACTED]. Everybody liked them. But they got in trouble with those responsible for the camps because of their friendly and humane approach to detainees. I can’t objectively speak about the people from Puerto Rico because I haven’t met enough; however, if you ask me, Have you ever seen a bad Puerto Rican guy? My answer would be no.

Just by virtue of having been written inside Guantánamo, Slahi’s book would be a triumph of humanity over chaos. But “Guantánamo Diary” turns out to be especially humane. Slahi doesn’t just humanize himself; he also humanizes his guards and interrogators. That’s not to say that he excuses them. Just the opposite: he presents them as complex individuals who know kindness from cruelty and right from wrong.

Slahi wasn’t arrested randomly; he ended up in Guantánamo for largely explicable reasons, which the book’s editor, Larry Siems, lays out in an introductory essay. Slahi grew up one of eleven children, the son of a nomadic camel trader. He was a smart kid, and, as a teen-ager, he memorized the Koran; at seventeen, he won a scholarship and left Mauritania for Germany, where he attended the University of Duisburg-Essen and studied electrical engineering. He was more than a student, however. He took two breaks from school to travel to Afghanistan and fight the Soviets. In 1991, he trained at a camp, near Khost, Afghanistan, which was run by Al Qaeda. He swore an Al Qaeda loyalty oath. The next year he took part in a siege operation; its leader was Jalaluddin Haqqani. Afterward, when the Soviets withdrew from Afghanistan and, as Slahi has put it, “the Mujahiden … started to wage Jihad against themselves,” he withdrew, too. He went back to school, and his Mauritanian wife joined him in Germany.

In a broad sense, there’s nothing unusual about fighting the Soviets in Afghanistan: thousands of young men did it, with American support. But a number of other facts, large and small, conspired to make Slahi remarkable. He kept in touch with the friends he’d made in Afghanistan, and some of them remained involved with Al Qaeda. Meanwhile, a distant cousin, Mahfouz Ould al-Walid (also known as Abu Hafs al-Mauritani), married Slahi’s wife’s sister, making him Slahi’s brother-in-law; Abu Hafs was one of Osama bin Laden’s theological advisers. (On one occasion, Abu Hafs called Slahi from bin Laden’s satellite phone; twice, in the late nineties, Slahi helped Abu Hafs send four thousand dollars back to his family in Mauritania.) Finally, when Slahi and his wife moved to Montreal, in 1999, they attended the al Sunnah mosque—the same mosque attended by Ahmed Ressam, a member of Al Qaeda who had been arrested, shortly after Slahi’s arrival, trying to cross the U.S.-Canadian border with a car full of explosives. Ressam’s plan—the so-called millennium plot—was to blow up Los Angeles International Airport on New Year’s Eve. After he was arrested, al Sunnah’s attendees came under scrutiny, and Slahi was put under surveillance. (In the book, he recalls finding a tiny hole, presumably for a camera, drilled into his bedroom wall.)

The net began to tighten. Slahi was questioned by Canadian police, who decided that he’d had nothing to do with the millennium plot. But he was sufficiently unnerved to move, in January of 2000, back home to Mauritania. (This was a mistake, he writes: it would have been better to stay in the West.) On his way home, Slahi was detained twice, first in Senegal and then upon his arrival in Mauritania, and interrogated further about the millennium plot; he was released both times, and settled into a job at a Mauritanian company. But, on September 29, 2001, he was detained again, and interrogated for two weeks by American agents. They released him, only to arrest him for good on November 20th.

“He reminded me of Forrest Gump, in the sense that there were a lot of noteworthy events in the history of al-Qaida and terrorism, and there was Slahi, lurking somewhere in the background,” Colonel Morris Davis, the chief prosecutor for Guantánamo Bay cases from 2005 to 2007, told Siems, in an interview for Slate. “He was in Germany, Canada, different places that look suspicious, and that caused them to believe that he was a big fish, but then when they really invested the effort to look into it, that’s not where they came out.” Eventually, Davis said, prosecutors concluded that “there’s a lot of smoke and no fire,” and declined to charge him. Meanwhile, in his introduction to “Guantánamo Diary,” Siems traces the fate of Slahi’s most incriminating connection, Abu Hafs. Investigators were impressed with the fact that he had opposed the September 11th attacks—it’s been widely reported that he wrote bin Laden a message objecting to them on scriptural grounds—and by the fact that, when they spoke to him in a Mauritanian prison, in 2012, he “renounced his ties to Al Qaeda.” After a period under house arrest, in Iran, he is now free.

A great deal of “Guantánamo Diary” recalls these events. The book flashes back to Slahi’s time in Montreal, and to his discovery that he was being surveilled; another section, set in Mauritania, details the wedding that Slahi was helping to plan, before he was sent to Guantánamo, for his “lovely niece [REDACTED].” But the most memorable sections are devoted to his interrogations, which Slahi describes with a mix of fear, rage, and wonder. In one telling exchange, Slahi asks, “What have I done?,” and the interrogator replies, “You tell me.” Another interrogator explains, in a reasonable tone, that “[REDACTED] is cooperating, and he has a good chance of getting his sentence reduced to twenty-seven years.” (This line of argument strikes Slahi as “anything but reasonable.”) Eventually, when he’s tortured, he tries telling the interrogators what they want to hear. “But the problem,” he writes, “is that you cannot just admit to something you haven’t done; you need to deliver the details, which you can’t when you haven’t done anything. It’s not just, ‘Yes, I did!’ No, it doesn’t work that way; you have to make up a complete story that makes sense to the dumbest dummies. One of the hardest things to do is to tell an untruthful story and maintain it, and that is exactly where I was stuck.”

The readers at the event I attended, who included the writer Andrew Solomon, the actress Lili Taylor, the novelist Ayana Mathis (“The Twelve Tribes of Hattie”), and the playwright John Guare (“Six Degrees of Separation”), all rendered Slahi’s voice in different ways—bright with anger, in some cases; heavy with irony, in others. The New Yorker’s Philip Gourevitch interviewed Siems and Nancy Hollander, one of Slahi’s attorneys, who described meeting Slahi for the first time. (He stood up and spread his arms while remaining, oddly, in the center of the room: “He wanted to embrace us, but he was shackled to the floor.”) Mathis read a passage in which Slahi described improving his English. (“If there is anything positive about [REDACTED], it is his rich vocabulary.”) The journalist Dina Salah Amer read about Slahi’s encounter with “Catcher in the Rye,” which, Slahi writes, “made me laugh until my stomach hurt.” (“It was my first unofficial laughter in the ocean of tears. Since interrogators are not professional comedians, most of the humor they came up with was a bunch of lame jokes that really didn’t make me laugh, but I would always force an official smile.”) Vocabulary is a big deal for Slahi. “I learned from my great lawyers [REDACTED],” he writes, “that the magic formulation of my request is a Petition for a Writ of Habeas Corpus. Obviously that phrase makes no sense to the average mortal man like me. The average person would just say, ‘Why the hell are you locking me up?’ ”

Lili Taylor (“Six Feet Under,” “High Fidelity”) gave the evening’s final reading. Slahi has been at Guantánamo so long that he’s outlasted some of his guards. In 2005, one of them, soon to leave the base, brought him a copy of Steve Martin’s “The Pleasure of My Company,” and, along with two other guards, inscribed it. “Good luck with your situation,” one of them wrote. “Just remember Allah always has a plan. I hope you think of us as more than just guards. I think we all became friends.” Another wrote, “For the past ten months I have done my damnedest to maintain a Detainee-Guard relationship. At times I have failed: it is almost impossible not to like a character like yourself. Keep your faith. I’m sure it will guide you in the right direction.”

The audience laughed, a little nervously: Were these moments of happiness allowed? Earlier, readers had shared passages in which Slahi recounted physical and sexual abuse, and those scenes lingered in the mind. Taylor, meanwhile, read Slahi’s reflection on those inscriptions:

I used to debate faith with one of the new guards. [REDACTED] was raised as a conservative Catholic. He was not really religious, but I could tell he was his family’s boy. I kept trying to convince him that the existence of God is a logical necessity.

“I don’t believe in anything unless I see it,” he told me.

“After you’ve seen something, you don’t need to believe it,” I responded. “For instance, if I tell you I have a cold Pepsi in my fridge, either you believe it or you don’t. But after seeing it, you know, and you don’t need to believe me.”

Personally, I do have faith. And I picture him, and these other guards, as good friends if we would meet under different circumstances. May God guide them and help them make the right choices in life.