Lightning has struck twice.

The original Pirates of the Caribbean: The Curse of the Black Pearl was an unexpected bolt from the blue, a movie based on a theme-park attraction that — unlike Disney’s similarly inspired The Haunted Mansion and The Country Bears — turned out to be unexpectedly fresh and buoyant. It became the surprise hit of the summer of 2003.

The sequel — which reunites director Gore Verbinski, screenwriters Ted Elliott and Terry Rossio, and pretty much the whole cast from the first film — could easily have played it safe, giving audiences a second helping of the first film’s swashbuckling fun and spooky thrills.

And, in fact, Pirates of the Caribbean: Dead Man’s Chest does offer most of what you’d expect: an even more convoluted plot, more eye-popping special effects and makeup, a more fearful supernatural nautical antagonist, all running again about a quarter-hour longer than it should have.

But there’s more to the story. The filmmakers let their imaginations run wild, taking chances and striving to outdo themselves on every level. The result is one of the most muscular, most memorably entertaining popcorn flicks in memory — a sequel that doesn’t merely repeat what made the first film popular but also offers things we weren’t looking for.

The original Pirates combined a lighthearted homage to the pirate-movie adventures of Errol Flynn and Douglas Fairbanks with the creepy thrills of a ghost story. The sequel is a far-ranging pastiche of everything from 20,000 Leagues Under the Sea to King Kong to The Seventh Voyage of Sinbad.

Filmed back to back with next summer’s as-yet-untitled part three, Pirates of the Caribbean: Dead Man’s Chest follows the middle-movie template established by The Empire Strikes Back. That means a darker, more sprawling story, bigger threats and a cliffhanger finale. At the same time, it introduces a villain as visually astonishing as Return of the Jedi’s Jabba the Hutt was in 1983: the mythical Davy Jones (as in “Davy Jones’ locker”), fiend of the deep.

Here established as the literally heartless captain of the Flying Dutchman, a ghost ship crewed by the doomed souls of those lost at sea, Jones (Bill Nighy) recalls Jabba not only by his slimy, invertebrate-influenced character design, but also in his relationship to Captain Jack Sparrow (Johnny Depp), loosely equivalent to Han Solo.

Jones looms large as a villain not only for Sparrow, but also for heroic Will Turner (Orlando Bloom), for reasons that might be guessed based on the first film. Sparrow and Jack each contend separately with Jones, while heroine Elizabeth Swann (Keira Knightley) pursues them both. Along the way we learn more about the heroes’ back stories as well as Jack’s magical compass, which turns out to be more complicated that it seemed in the first film. As Christian critic Jeff Overstreet commented after the screening, it’s almost a moral compass. We soon understand why Sparrow is unable to get his bearings from it.

Not only Jones himself, but the whole crew of the Flying Dutchman are a fascinating, fearful feast for the eyes, going light-years beyond the first film’s skeletal pirates. In particular there’s one character with a conch for a head (don’t try to picture it) that must be seen to be believed. Looking at some of these creations, one is agog not just at the technical achievement — exceptional as it is even in this age of high-tech effects — but at the imagination that went into thinking up these bizarre images, and the fact that they were made at all.

Then there’s the comic swashbuckling action. The first film’s swordplay and such was merely energetic and well done. This time around the action sequences are utterly inspired, at times evoking the ingenuity and physical comedy of a Buster Keaton or Jackie Chan set piece, crossed with the Rube Goldberg logic of a Chuck Jones cartoon.

The first great action sequence is staged on an island where the heroes are captured by unfriendly natives and face a grim fate — a familiar premise recalling everything from King Kong to King Solomon’s Mines to Return of the Jedi. Yet the madcap escape sequence is incomparable. Like the truck sequence in Raiders of the Lost Ark, it takes the kind of thing that others have done before and does it so brilliantly that it becomes the new standard.

Other innovative action treats include a musical-chairs swordfight with three allies sharing two swords while facing an army of foes and a three-way duel that ranges from an open beach to a rooftop before literally spinning off into uncharted territory. Dead Man’s Chest does wonderful things with things that roll.

A slight but distinct spiritual vibe runs through the film, a vague, uncomfortable awareness of judgment after death. “Do you fear death?” Jones asks new prisoners as he offers them a Faustian choice between death and eternal service on his ship. “Life is cruel. Why should the afterlife be any different? Why not postpone the judgment?” Most of the sailors accept this Faustian bargain, though one sane soul demurs (“I’ll take my chances”) and is quickly dispatched.

In a comic variation on the theme, one of the formerly cursed pirates from the first film has taken a new interest in spiritual matters. “We’re not immortal any more — we got to take care of our immortal souls,” he warns his companion, intently leafing through his Bible.

The other eyes him dubiously. “You know you can’t read.”

But the first is undeterred: “It’s the Bible — you get credit for trying!” (It would be nice to see this minor theme of judgment and life after death continue, perhaps even pay off somehow, in the third film next summer.)

Over the last three years, the original Pirates of the Caribbean has grown in my estimation and affection. I must, though, stand by the observation in my original review that, while it may be similar in spirit to such genre-celebrating films as Raiders of the Lost Ark, creatively speaking it isn’t in the same league.

The sequel, despite ongoing unevenness and storytelling nonsense, goes further. Dead Man’s Chest is more or less the seafaring Raiders promised but not quite realized by the first film.

Content advisory: Much stylized swashbuckling action violence and menace; moderately scary and gross imagery (tentacled monsters, etc.); mild sensuality and innuendo; a depiction of a soothsayer/witch. Teens and up.

Steven D. Greydanus

is editor and chief critic