For longer than one might want to admit, going to a James Bond movie has been more a matter of habit than of real enjoyment. People went to a thoroughly mediocre piece of Bondage like “The World Is Not Enough” (1999) for the same reason they continue to watch the flaccid, pedestrian current version of “Saturday Night Live”–not because there’s much expectation that it will be good, but out of a generalized nostalgia for the time that it actually was. That’s why it’s a pleasure to report that the latest installment in the venerable series is the best in a while, not simply a chore to sit through. “Die Another Day” is still too long, and the second half, with its succession of climactic set pieces designed to wow us but more likely to cause fatigue, wears out its welcome by a considerable margin. But especially in its initial reels, it boasts a touch of the moody elegance of the early Bond flicks, and some of the throwaway jokes it features are actually amusing instead of groan-inducing. Lee Tamahori’s direction, apart from the more grandiose action sequences which tend to get away from him and wind up seeming chaotic, is above average, and Halle Berry makes a svelte and attractive Bond girl who looks great in a bikini or skin-tight leather outfit (her voice is a trifle whiny, though). Even Pierce Brosnan is better this time around. He’s grown into the part nicely, and no longer seems the lightweight poseur he was in earlier pictures. All told, if “Die Another Day” isn’t the equal of the Sean Connery flicks, it at least comes within striking distance of the best post-Connery entries, easily topping most of those intervening episodes.

Of course, all that being said, the picture is more a satisfying retread than a new model, even if Bond gets the obligatory missile-shooting auto (a Thunderbird) in it. (Unfortunately, the vehicle’s special power–to become virtually invisible with the flick of a switch–all too closely resembles the similar ability of the stealth plane in the recent “I Spy.”) The primary villains are some North Koreans (ah, for the simpler, dumber days of Spectre, with their more florid bad- guys) who capture and torture our hero after he breaks up one of their devious plots. Freed in a prisoner exchange but under suspicion that he might have broken and talked while in Korean hands, Bond must go rogue to track down the surviving baddies and prove his untrammeled loyalty. The effort takes him to a Cuban clinic that genetically provides people with totally new appearances and identities and to a huge facility in Iceland, where a satellite device called Icarus–a mechanical means of beaming sunlight to areas devoid of it–is being tested. (Unfortunately, it can also serve as a weapon.) Among the other characters introduced are an American agent called Jinx (Berry); Gustav Graves (Toby Stephens), the boyish, arrogant British mogul who’s behind Icarus; his secretary, the beauteous Miranda Frost (Rosamund Pike), who turns out to have a secret side; and a vicious North Korean agent named Zao (Rick Yune), whom Bond must find to clear his name. The connections among all these figures–as well as M (Judi Dench), weapons master Q (John Cleese, here fully replacing the late Desmond Llewelyn), and Falco (Michael Madsen), the typically smarmy, uncomprehending US security chief–are complicated; but the convolutions never succeed in creating as much surprise as the filmmakers intended.

If “Die Another Day” is basically formulaic, though, it employs the formula with greater success than one might have expected. Brosnan tosses off the usual heroics with considerable aplomb, even if Bond seems a little denser regarding Graves and Frost than one might have liked. Over the course of the first hour, moreover, most of the action episodes remain at least ground in reality, however hyperbolically. In the second half, unhappily, the picture veers off toward the cartoonish, and two large set pieces–the first involving a car chase in a huge ice palace, the second a battle aboard a jet plane–aren’t choreographed as cleanly as they should be. Finishing off things with not one but two short “toppers” would have worked better if the gags were less obvious, too.

The James Bond franchise is celebrating its fortieth anniversary this year, of course, and it’s hardly surprising that some measure of fatigue has set in–the miracle is that the franchise survived the Roger Moore years at all. “Die Another Day” doesn’t fully recaptures the magic of the Connery films, but avoids the torpor which has afflicted most of the later ones. 007 may seem positively geriatric in the age of Vin Diesel and “XXX,” but an entry like this demonstrates that there’s a pulse in the old boy yet.