But these are wild exceptions. The everyday reality of life in the jihad is often closer to a bumbling black comedy than to a redemptive tragedy or a bildungsroman. Many of those who land in terrorist groups are criminals or desperate men with a history of failure and a thirst for revenge. Most major terrorist attempts in the past decade have ended in humiliation, like Richard Reid’s shoe-bombing plot in 2001 and Al Qaeda’s repeated attempts to load explosives into the underwear of suicide bombers. And Al Qaeda’s regional affiliates often appear to be profoundly dysfunctional organizations, run by men whose narcissism is at odds with their solemn professions of selflessness and holy purpose. Last month The Associated Press published excerpts from an extraordinary and revealing letter, discovered in the rubble of Timbuktu after the French military routed the jihadis there. In it, the leaders of Al Qaeda’s North Africa branch accuse one of their most unruly commanders, a man named Mokhtar Belmokhtar, of failing to file expense reports, leaving his phone off, skipping meetings that he called “useless” and failing to carry out any “spectacular operations.” They complain about Belmokhtar’s “backbiting, name-calling and sneering” and accuse him of making a “mockery of the basics of administration.” In a passage straight out of Beckett, they describe a delegation sent to contact Belmokhtar that spent three years lost in the desert and then disintegrated without having reached him.

My own experience with the world of jihadis is littered with similar bouts of absurdity. An acquaintance who spent time in a radical religious school in northern Yemen once told me how the students, most still in their teens, would fight over the rare Western magazines that reached the school. Whoever succeeded in grabbing the pages with images of women on them (these were ordinary pictures, not pornography) would rush straight to the bathroom to masturbate. Then, inevitably, they would visit my acquaintance (who is American), telling him how they had sinned against God and could only redeem themselves by carrying out a “martyrdom operation” as soon as possible.

Scrolling through the postings on jihadi Internet sites, I used to feel I was watching frustrated teenage actors, many of them begging for more attention from the West for their exploits. There are macabre attempts at humor, like the compilation of photographs of wounded American soldiers I saw in 2006 under the heading “Jihad Candid Camera.” Even the online magazine Inspire, which appears to be an entirely serious propaganda effort produced by a branch of Al Qaeda in Yemen, is full of articles that ride an eerie line between comedy and the promotion of murder, like the one titled “Make a Bomb in the Kitchen of Your Mom.”

Then there are the videotaped statements suicide bombers make before they die. In the abstract, there is nothing funny about these ghoulish productions, and yet there is something revelatory about the opening scene of Chris Morris’s 2010 satire “Four Lions,” in which a young British jihadi addresses the camera for his last testimonial while cradling a small toy gun. “Eh up, you unbelieving kuffar bastards,” he says in a thick Yorkshire accent. When his friends stop filming and tell him to drop the toy gun, he demurs, his face crestfallen, and insists it only looks small because he has “big hands.”

“Four Lions” is an uneven film, but at its best it does for jihadis what “Spinal Tap” did for heavy metal, revealing a ludicrously adolescent consciousness at the center of a myth. “Bomb the mosque!” shouts one of the cell members in the film, a belligerent white convert to Islam named Barry. “Radicalize the moderates! Bring it all on!”

You laugh. But those words, or words like them, have been spoken and acted upon by real people, with deadly results. When I asked Jean-Pierre Filiu, a French scholar and one of the most respected analysts of jihadi groups, whether anyone had really succeeded in capturing the everyday truth of their world in fiction or film, he ran through a number of novels on the subject and dismissed them all: too many were unconvincing or tied up in political agendas. Then, after a long pause, he said: “Seriously, the way most of them operate? I think ‘Four Lions’ said it best.”

If this is true, it is not because Islamist militancy and its many victims are a laughing matter or that its heroes are all better off dead. It is because satire has uncovered something real, something that is missing from most of what has been written on the subject. The moments when jihadis seem most vivid — to me, at any rate — are those when they have been brought down to scale, when we (and sometimes they) recognize the gap between their own bumbling frailty and the icy ferocity of their creed. Last year Omar Hammami, an American-born jihadi who has a $5 million reward on his head, published a memoir online that includes a number of these moments. It is written in an unmistakably American voice, full of slang and exclamation points and spontaneous, self-deprecating humor. He describes miserable slogs through the Somali jungle with the mujahedeen, terrified of lions and army ants, sick with hunger and fatigue, dreaming of Krispy Kreme doughnuts. At the end of the book, he confesses to feeling homesick and imagines being allowed just “three days” in Alabama to see his parents and his sister Dena. “After going through all the hugs and kisses, me and Dena would probably go running around town laughing our heads off and talking about a billion things without ever finishing a conversation about any of them,” he writes. Perhaps Hammami does not deserve that three-day respite. But that does not make his memoir any less poignant or less human.