New Hyde hospital—a cash-strapped mental institution in Queens—is the setting of Victor LaValle’s excellent third novel. Think One Flew Over the Cuckoo’s Nest meets Dante’s Inferno. LaValle anticipates the inevitable comparison to Kesey and tips his hat early on, when a patient says that though Kesey’s novel takes place in a mental hospital, “it isn’t about mentally ill people.” In the same manner, LaValle makes it unclear who is crazy and who isn’t; the overlapping realities of the doctors, nurses, and patients really aren’t so different.

The omniscient narrator chases many perspectives through the fluorescent-lit corridors of New Hyde—even a rat’s—but the central character is Pepper, a big-shouldered, working-class troublemaker who ends up institutionalized simply because it means less paperwork for the police. Pepper is led to believe he will face a judge after 72 hours, but bad luck and bad decisions keep him at New Hyde—always medicated, sometimes restrained to his bed so long the small of his back “stopped feeling like a curled fist a day ago and now was just a pocket of cold fire burning through his waist.”

And you never want to end up restrained at New Hyde. Because the Devil is on the prowl. He is housed—or so the patients believe—behind a silver door at the end of an empty hallway. At night he visits his neighbors. His heels clop “like horseshoes on cobblestones.” He has the body of a frail old man, but the head of a bison, with a “deep, wet pit” of a mouth and “dead white eyes.” Pepper’s roommate—a malt ball-headed man named Coffee who spends most of his time trying to phone the president—believes, “The food makes us fat. The drugs make us slow. We’re cattle. Food. For it.”

The novel is genuinely unsettling—as the devil lowers himself from the ceiling, as the doctors and nurses abuse the patients, as a woman commits suicide by swallowing a bed sheet so deeply that its tip is stained yellow with bile—but it is also very funny. LaValle has a wicked sense of humor, and the gags often come as a relief, such as when an institutionalized teenage girl in baby-blue Nikes takes down a big man with her “crazy strength” or a monstrous rat crashes through a ceiling tile, snatches a box of Cocoa Puffs, and scampers through a gauntlet of nurses stomping their feet and swinging brooms. In a novel suffused with the tragic and sinister, humor is necessary, modulating emotion, keeping us off guard. But on occasion, LaValle gets too silly and cute. The hospital administration, always cutting corners, repurposes the building “like a motherfucker.” And as Pepper sneaks his lover into his room, the narrator says, “ladies and gentlemen, despite the perceived differences between them and you, the mentally ill like jooking, too!” Moments like these make the tone feel unstable, and the moments of genuine terror harder to take seriously.

But these are small gripes. The novel, expertly written, will leave you wondering about its many memorable characters and lingering over questions about fear, horror, madness, suffering, friendship, and love.

Benjamin Percy is the author of the novels Red Moon (forthcoming from Grand Central) and The Wilding, as well as two books of short stories. His honors include the Whiting Writers’ Award, and inclusion in Best American Short Stories and Best American Comics.