Bill Skarsgard as Pennywise in New Line Cinema’s horror thriller “IT,” a Warner Bros. Pictures release. (Photo by Marco Grob/Warner Bros. Pictures)

It” may not be Stephen King’s most beloved book (that’s probably “The Stand”) or his most ambitious effort (that’s probably his eight-book opus, “The Dark Tower” series). But the book about a band of friends who come together to battle a wicked psychic clown may be his best: the great American horror novel, a literary glimpse into the terrors it has cultivated through the years. And that’s in large part because King, in the way he structured the book, made Derry, the town in which the novel is set, a character unto itself — a character into which boomer King poured all his generation’s anxieties and fears.

“It” is King’s most inventively structured book: We follow a group of friends in the fictional Derry, Maine, in two different eras, hopping back and forth between 1958, when they are preteens, and 1985, as they confront the evil presence that has haunted the town for centuries. These hops through time are bisected by “Interludes” told from the first-person perspective of Mike Hanlon, the group’s only African American, who, as the rest fled, stayed in Derry and grew up to be the town’s librarian. The interludes track Mike’s compilation of the town’s sordid history, an effort to expand his (and our) knowledge of Pennywise’s behavior beyond Its interaction with him and his friends.

“This notebook is supposed to be an effort to get beyond that obsession by widening the focus of my attention — after all, there is more to this story than six boys and one girl, none of them happy, none of them accepted by their peers, who stumbled into a nightmare during one hot summer when Eisenhower was still president,” Hanlon writes in his Derry diary early on. This might as well be King speaking to the audience, telling us the book is about more than things that go bump in the night. It’s about a special breed of ugliness, the mold on white-bread America.

Through this fractured storytelling — especially in the Hanlon-focused interludes — we learn that Pennywise, the evil spirit haunting the town, is something like a locust brood crossed with an emotional vampire, awakening every 27 or 28 years to feed off fear before returning to his slumber. But fear has to come from somewhere, and in Derry, the catalyst is hate — pure, naked hate. Pennywise’s cycle of violence in 1985 kicks off with a gay bashing on a Derry bridge; an earlier cycle had ended some 55 years before with the Derry branch of the Legion of White Decency burning down an African American nightclub, the Black Spot, while hundreds of patrons danced and drank inside.

“I came back [to Derry] because I’d seen the South and I’d seen the North, and there was the same hate in both places,” Hanlon’s father tells him while recounting the story of the Black Spot. “It was the fire at the Black Spot that convinced me of that.” A similar breed of hate led to the good people of Derry merrily coming together to slaughter the Bradley Gang, gunning down like dogs men and women alike in the middle of the street in 1929. It led to anti-union violence at the turn of the century — an organizer found murdered, legs hacked off, toes stuffed in his mouth — and retaliation for the crime in a bar a short time later when a handful of company men were ax-murdered as townsfolk literally ignored their screams, drinking and chatting and playing bar games all the while as the blood flowed.

Besides, it happened in Derry,” Hanlon writes, echoing one of the old-timers in town who told him of the Bradley massacre. “I’ve heard it before, and I suppose if I continue to pursue this I’ll hear it again … and again … and again. They say it as if speaking patiently to a mental defective. They say it the way they would say Because of gravity if you asked them how come you stick to the ground when you walk.”

Derry is, simply, the locus of everything wrong with American society in King’s view — a fact that becomes clearer when you see how King uses Derry in “11/22/63,” a book in which Jake Epping, who discovers a portal through time, tries to stop Lee Harvey Oswald from assassinating JFK. But before he sets off to do that, he spends some time in Derry — just a few months after the kids of “It” first put a stop to Pennywise’s rampage in 1958.

He can sense something horribly wrong in the town; there’s a cloud of oppressive evil throughout. It’s a sensation Epping will feel again, in Dallas, years before the attempt on Kennedy’s life.

“I could move out from beneath the suffocating shadow I felt over this city,” Epping says of Dallas. “There were undoubtedly good people in Dallas, thousands upon thousands of them, the great majority, but that underchord was there, and sometimes it broke out. … Bevvie-from-the-levee had said that In Derry I think the bad times are over. I wasn’t convinced about Derry, and I felt the same way about Dallas, even with its worst day still over three years away.” Dallas, a major American city with a more-or-less median murder rate, is, to King, the equivalent of a fictional town terrorized by literal evil that has a murder rate six times the national average.

The Dallas-Derry connection is no coincidence. Because Kennedy’s assassination took place there, Dallas has long occupied a haunted place in the historical memory of the baby boomer generation, who blamed Kennedy’s death on conservative extremism, no matter that Lee Harvey Oswald’s real politics were far to the left. The “suffocating shadow” that hangs over Dallas for King is concentrated into specific, malevolent form in Derry.

By treating Derry itself like a character — a living, breathing entity with its own hopes and fears and secrets; a kissing cousin of Dallas, another malevolent force in the boomer mind — King imbued “It” with a greater meaning. This is the Great American Horror Novel because it is, in a very real way, about the horrors of America as experienced by the children of the Greatest Generation.

One understands the need to jettison the structure of the book and focus only on the childhood years of the “Losers Club” that takes on Pennywise; the novel is 1,100 pages long, and Andy Muschietti’s movie adaptation, opening Friday, had to make cuts somewhere. But the film loses much of the power of the book by simplifying the structure and narrowing the stakes. King’s novel highlighted what scared his generation about America’s past and present; Muschietti’s film is a coming-of-age story about what scares a few random kids. The movie has its pleasures, but it is very much a lesser, more insubstantial thing.