"Wayward Pines," Fox's rising-panic journey through a spooky town nestled in a spookier forest, offers many attractions, not the least of which is its format. As many have already noted with unabashed relief, "Wayward Pines," which premieres Thursday, is an actual miniseries — as opposed to a miniseries with renewal ambitions — a designation that means there will be something approximating an ending/answer in the 10th and final episode.

Or not, of course. "Wayward Pines" is based on a trilogy by novelist Blake Crouch, who is still living and, one assumes, capable of signing off on a sequel or prequel. More important, it is produced and the pilot-directed by M. Night Shyamalan, a man with whom many of us lost faith the moment we saw the truly absurd monster costumes in "The Village."

So hope for legitimate closure at your own peril; it may be just one of the many illusions conjured in screenwriter Chad Hodge's mostly successful attempt to keep the "Wayward Pines" audience in the same state of suspended confusion as its lead character.

That would be one Ethan Burke (Matt Dillon), a Secret Service agent heading toward this small Idaho town in search of two missing colleagues, one of whom happens to be his former partner, Kate (Carla Gugino), with whom he had an affair.

Alas, he and his partner are involved in a terrible car accident, after which Burke finds himself in the town's hospital attended to by a nurse so singular she is played by Melissa Leo. Among many other wonderful things, Leo introduces the series' most effective mood-altering tool: its cast.

Like an episode of "The Love Boat" or a disaster movie from the 1970s, "Wayward Pines" presents a series of well-known actors in unexpected roles. Is that Juliette Lewis playing an oddly friendly bartender? Terrence Howard as the sheriff with a strangely menacing ice cream fetish? There's Toby Jones as the amiable doctor. That's Justin Kirk, briefly seen as a bearded Realtor, and Hope Davis as the zealous teacher who is definitely Hiding Something.

Honestly, for a critic of a certain age, it became difficult not to scan the crowd scenes in search of Red Buttons or Mr. Fred Astaire.

They are no longer with us, of course, but their appearance would make about as much sense as anything else that happens in "Wayward Pines," a story that prides itself on not making any sense at all until, in Episode 5, All Is Revealed. Maybe (see above notes about purposeful audience confusion). In this case, the maybe is just fine; veracity matters less than the highly ambitious nature of the twist.

I mention the twist because the first four episodes, though moody and perplexing, may seem a bit overlong and distinctly familiar. We follow Burke as he attempts to make sense of, and then get out of, Wayward Pines, a community seemingly so placid and perfect that we know, almost instantly, it absolutely is not. Meanwhile, his wife (Shannyn Sossamon) and son become increasingly concerned about his inability to answer his cellphone and are soon heading Wayward Pines' way themselves.

Echoing, or directly referencing, many works from the canon of Nightmare Reality (including but not limited to "Twin Peaks," "The Twilight Zone," "Lost," "The Prisoner," "Stepford Wives" and much of Stephen King), "Wayward Pines" traps Burke in a situation at once familiar (he finds Kate) and utterly bizarre (boy, is she different). Eventually, he is forced to either surrender to the illusion himself or find the man behind the curtain. (Guess which one he chooses.)

Equally happy to consider the joys of rum raisin and the need for ritualized violence, "Wayward Pines" veers, at times, toward a self-consciousness one might call Fever Dream Camp. But mostly it's good, creepy fun, a round-the-fire story of a series that may turn out to be about something bigger than it seems.

Even if it doesn't, there's always Melissa Leo. Unless she winds up in a monster costume, she's always worth watching. And maybe even then.