The enjoyment of “The Matador” lies in watching Pierce Brosnan, just replaced as 007, trash his James Bond persona with such wicked zeal that you might forget he’s the same guy who played the smooth, sophisticated agent for the past decade. And though the rest of Richard Shepard’s black comedy doesn’t measure up to his performance, following a flightplan that, despite quirky touches, isn’t all that unpredictable, it manages a landing decent enough to merit a ticket.

At its foundation the script is a refashioning of the old standby about a principled guy who falls in with a rotter and has to struggle not to be seduced by the attraction of the Dark Side. In this case the good fellow is Danny Wright (Greg Kinnear)–even his surname is a giveaway–a struggling Denver businessman who travels to Mexico City to land a deal that could just turn his luck around. While trying to control his frayed nerves with a drink in the hotel bar late one night, he meets nonchalantly abrasive, bedraggled Julian Noble (Brosnan), who just happens to be an international assassin who’s just finished his latest contract (in an amusing scene in which he’s exhibited his disdain for humanity at large by dissing a kid). This first meeting doesn’t go terribly well, since Noble’s rude joking turns Wright off, but Julian, who’s having a career crisis of sorts, is desperate for companionship and persuades Danny to join him at a bullfight the next day. There, under prodding from the businessman, he not only reveals his profession but, to prove he’s not joking, provides a demonstration of how to pull off a job. Danny is both fascinated and appalled; but when Julian tries to enlist his help in his next assignment, he begs off.

At this point the picture jumps ahead to show Julian’s disintegration as a hit-man; after he flubs a couple of assignments, his employers have made him a target himself. That’s why as Danny and his wife Carolyn (Hope Davis) settle down for a quiet evening in their snow-covered suburban abode one night, who should show up but Noble, beguiling Carolyn after her initial trepidation and asking for a favor once again from the now-successful Danny–with an enigmatic reminder that the fellow owes him. The picture swings back on itself to explain his remark, to some extent; but don’t expect complete candor.

Shepard’s script is a cut above the usual standard of mismatched-buddy movies, and his direction is mostly stylish and accomplished as well. And visually the film, nicely photographed by David Tattersall, is quite attractive–something that’s particularly impressive when one knows that it was shot entirely in Mexico City, which stands in surprisingly well for Denver ands various European locales (special credit is obviously due to production designer Rob Pearson and art director Marcelo Del Rio). Kinnear does one of his least irritating turns as Wright, catching the fellow’s tragic undercurrents as well as his general likableness, and Davis is strong in an underwritten part. But what makes “The Matador” work as well as it does is Brosnan’s willingness to play against type, ebulliently deconstructing the persona he’s cultivated from “Remington Steele” through “The Thomas Crown Affair.” (Of course, he’s already shown that penchant in “Evelyn,” “Laws of Attraction” and “After the Sunset,” but nowhere to this extent.) The whole performance is a ripe, raunchy put-on, but it’s enormous fun; and certainly you’re not likely to forget the sight of him clomping heedless of the stares that follow him through the hotel lobby to the pool, wearing nothing but boots and a swimsuit so tight that his paunch protrudes markedly. That scene’s particularly outrageous, but it’s definitely of a piece with the rest of his richly seedy turn.

The picture takes its title from the event where Noble and Wright first bond and the comparison the hit-man draws between the bullfighter and himself. This “Matador” may not manage a clean cinematic thrust, but Brosnan certainly puts on a fine, flamboyant show to keep the crowd entertained.