"Spectre" is the 24th James Bond film produced by Eon Productions. It features Daniel Craig in his fourth performance as James Bond, and tells the story of Bond's first encounter with the global criminal organization, Spectre. (  / Columbia Pictures)

Since the advent of modern-day action heroes Jason Bourne and Ethan Hunt, James Bond’s most challenging assignment has been to stay relevant. “Spectre,” the 24th film in the 53-year-old franchise, finds the superannuated spy fighting that battle more strenuously than ever, as British intelligence threatens to demolish the double-0 program in favor of a worldwide surveillance system powered by drones and Big Data.

Daniel Craig — who played Bond in the impressive “Casino Royale,” the incomprehensible “Quantum of Solace” and the stylishly moody “Skyfall” — pads through “Spectre” with his usual practiced nonchalance and petulant, pooched-out pout. After a lavishly staged opening sequence — featuring a bravura tracking shot snaking through a gorgeous Day of the Dead parade in Mexico City — the film reverts to expected form, with Bond outrunning obsolescence with unerring timing, always-perfect aim and a flawlessly pressed dinner jacket that appears magically as needed. When the opening scene ultimately ends in a riot of gunfire, an exploding building and a fistfight aboard a careening helicopter — culminating in a risibly pseudo-sexy credit sequence featuring Sam Smith listening to himself far too attentively — it seems clear that “Spectre” is going to dive into Bond’s potential for high camp with all the macho wish fulfillment and winking innuendo it can muster.

Daniel Craig stars as James Bond in the 24th installment of the 007 movie franchise. (Jonathan Olley/Metro-Goldwyn-Mayer Pictures/Columbia Pictures)

Christoph Waltz, left, plays down his usual over-eager persona as the man out to get James Bond while Léa Seydoux plays a psychologist — and Bond’s latest love interest. (Jonathan Olley/Metro-Goldwyn-Mayer Pictures/Columbia Pictures)

Sadly, that promise of fun is quickly abandoned as soon as Bond sets off on a journey that will lead him from Mexico back to London, where the new M (Ralph Fiennes) is squabbling with C (Andrew Scott) about MI6’s coming merger with MI5. Bond is supposed to be on hiatus, but he finagles some gadgetry from Q (Ben Whishaw) and is soon on his way to Rome, Austria, Tangier and beyond, on the trail of a mysterious figure called the Pale King, and ever-alert to possibilities for romance and looking cool under pressure.

“Spectre,” which has been directed by Sam Mendes from a script by several writers, knows just what marks to hit, but it obeys the conventions of the series so faithfully that it begins to feel rote. All of the psychological depth and austere visual beauty of “Skyfall” here has been over-processed into easily digestible chunks of story delivered by way of windy explanatory speeches, clumsy foreshadowing and stunts that feel both perfunctory and increasingly absurd. What “Spectre” lacks in realism it makes up for in ugly digital photography (especially in low-light situations) and retrograde sexual politics. Léa Seydoux, who plays Bond’s love interest, may want to consult with “Mission: Impossible’s” Rebecca Ferguson for tips on how to find scripts that bring a female supporting role into the 21st century without losing an ounce of seductive allure. (Let us pause to lament the absence of the great Judi Dench, whose flinty intelligence was crucial to lending recent Bond films class they might not have otherwise deserved.)

Craig has made public statements recently about not wanting to play Bond again, and if “Spectre” is any indication, he has already taken early retirement. He makes for a weirdly dyspeptic figure throughout the sloggy 2  1/2 -hour run time, looking like a man going through the motions in an exceptionally smart wardrobe of bespoke outerwear. To his credit, Christoph Waltz plays down his usual grinning, over-eager bad-guy persona as the megalomaniacal cat to Bond’s cagey, resourceful mouse. But a late-game Big Reveal about his character feels desperate, and alert viewers will see his “secret” henchman whistling down Main Street with a top hat, cane and white carnation.

This is a canon that has always danced a fine line between sophistication and playfulness, a balance that “Spectre” strikes by affecting a strangely dour, self-serious air. We don’t expect a James Bond film to be deep, but at least we should be dazzled by the seductive gloss of its surfaces. Aside from that stunning opening sequence, this installment feels overcompensating and dutiful. By the time — finally — that 007 orchestrates a Grand Guignol climax that plays out like pre-ordained clockwork, the viewer might be forgiven for thinking that this particular program can’t be abolished soon enough. The most enduring blessing of the Bond franchise has always been its embrace of reinvention.

PG-13. At area theaters. Contains intense sequences of action and violence, some disturbing images, sensuality and obscenity. 148 minutes.