Visually Denzel Washington’s new film is one of the ugliest movies to appear since Joe Carnahan’s repulsive “Smokin’ Aces,” and it’s not much better in narrative terms, either. Generically “Safe House” is a cynical spy story with a dollop of Washington’s dark “Training Day” added to the mix. But it’s so nasty and chaotic that it’s a truly depressing endurance test.

Washington stars as Tobin Frost, a onetime CIA agent who went rogue and has been on the lam for years, selling intelligence secrets left and right. As the picture opens, he’s in Capetown, finalizing a deal for a cache of incriminating documents he intends to put on the market. But he and his contact become targets of a gang of heavily-armed assassins, and so Frost turns himself in at the US consulate. He’s transferred to the titular (and, as it happens, misnamed) safe house presided over by bored newbie Matt Weston (Ryan Reynolds), where a CIA interrogation squad headed by Daniel Kiefer (Robert Patrick) has at him via the most extreme methods, including waterboarding.

The place is soon invaded by the same gang that tried to kill Frost, however, and Kiefer and his associates are killed, leaving only Weston and Frost alive and in flight. Weston must keep his canny captive—and himself—alive until they can reach another safe house, where bigwigs from Washington will join them. But that’s hardly an easy task, since they’re still being pursued and Frost is anxious to get away to do his own thing. An avalanche of car chases, foot chases, fistfights and gun battles follow, all staged with as high a level of violence and edge that director Daniel Espinosa and his army of fight choreographers and stuntmen can manage. To add to the unpleasantness of it all, cinematographer Oliver Wood shoots it all—the expository material as well as the action sequences—in a hideously jittery handheld style, punctuating everything with cruelly oppressive close-ups and bleaching the color stock to give the images a dry, pinched, grim appearance.

There’s little mystery why Washington—who also served as one of the executive producers—chose this project for himself: he gets to play the same sort of darkly heroic character that’s occasionally served him well in the past. But in this case he’s miscalculated badly. David Guggenheim’s script is poorly constructed, not merely because it closes with yet another variant of the moldy old “Three Days of the Condor” finish but because its handling of the plot, involving a mole in the CIA, is ineptly done. The picture periodically takes us to Langley, where Director Harlan Whitford (Sam Shepard) and his top lieutenants Catherine Linklater (Vera Farmiga) and David Barlow (Brendan Gleeson) argue about how to proceed. Quite simply, the identity of the villain is pretty obvious from the get-go, so the big reveal near the close turns out to be a damp squib. And the overarching explanation of ubiquitous governmental corruption is by now such a cliché that it comes across as just shallow pandering to an automatically skeptical audience.

Still, Washington does his usual competent job, appearing to enjoy playing older before shaving and grooming himself to become his familiar handsome, smiling self. But except from the physical perspective, it’s hardly a role that stretches him. Reynolds, who’s had a bad year with a string of flops, tries to mix callowness and courage here, but the former dominates; and his big fight scene near the close with Joel Kinnaman is excessively prolonged and brutal. (He’s given a romantic interest—a French girl played by Nora Arnezeder—but little comes of it beyond one intimate scene.)

The supporting cast is even more poorly used, with Shepard falling back on a dull world-weary attitude and both Farmiga and Gleeson just going through the motions. Of course, they’re primarily employed as suspects in the mole business, but the guilty party is apparent very early on, which undermines any hope of suspense. Ruben Blades offers a few moments of grizzled charm as a document forger, but it’s no more than a cameo. Ramin Djawadi’s score is loud and unimpressive.

“Safe House” wants to be smart, edgy and exciting. Instead it’s dumb, ugly and, despite all the mayhem, curiously dull.