Watching this movie from writer-director James Gray (“Little Odessa,” “The Yards”) is like stepping through a time warp into a gritty cop melodrama from the 1970s, even though the story is set in 1988. And that story—about brothers on the opposite sides of the law—in turn hearkens back to studio gangland tales of the thirties and forties. So “We Own the Night” isn’t just old-fashioned, it’s old-fashioned squared. And in its oddball earnestness, it’s positively square, too.

The set-up involves an effort by Deputy New York Police Chief Bert Grusinsky (Robert Duvall) and his straight-arrow son Joseph (Mark Wahlberg), who’s also on the force, to lead an assault on the drug trade being conducted by the Russian mob. Unfortunately, their first raid brings them into a raucous Brooklyn night club owned by elderly Marat Bujayev (Moni Moshonov) but managed by Bobby Green (Joachin Phoenix), who’s actually Bobby Grusinsky, Joseph’s brother. The target is the genial Marat’s brutal nephew Vadim (Alex Veadov), who’s becoming a major player in drug trafficking and is surrounded by a gang of scowling thugs.

The raid puts Bert and Joseph at further odds from prodigal son Bobby, whom they already see as having gone over to the dark side (and whose vivacious girlfriend Amada, played by Eva Mendes, they hardly approve of). But when Vadim takes vengeance against the cops, seriously injuring one of the Grusinskys in the process, Bobby flips and agrees to do undercover work. Though he’s successful in getting the goods on Vadim, however, a series of blunders frees him and leads to tragedy.

The combination of intergenerational family drama and cops and mobsters set-to that Gray’s contrived here has a certain visceral power, but “We Own the Night” (a title taken from the slogan the police unit operates under) falters under the strain of clumsy plot turns, banal dialogue and cliched characters. Time and time again the good guys whom you’re supposed to be rooting for act in so disastrously (and inexplicably) inept a fashion that you come to feel that Vadim’s dismissal of the police as incompetent is entirely correct. And the effort to give the piece a big, almost surrealistic finish with a pursuit in a field of tall weeds comes off as slightly ludicrous rather than compelling. (An uplifting coda doesn’t help, either.) Beside these fundamental problems, slips in the period detail are irritating but, in the final analysis, trivial.

The actors don’t make up for the script’s failings. Duvall does his standard-issue gruff old man routine without much nuance, and Wahlberg seems frankly pro forma after his stellar work in “The Departed.” Mendes is equally rote as a girl driven off by pressure she can’t bear, while Veadov’s villain offers little beyond the most obvious sort of menace (the softer, subtler Moshonov is more impressive). But their work, along with that of the rest of the cast, is really in support of Phoenix, who pretty much has to carry the picture on his shoulders and proves unequal to the task, especially in the latter stages, when—oddly enough—his beefy physique, sluggish movement and slurred speech pattern make him weirdly reminiscent of Marlon Brando’s Don Corleone. Phoenix isn’t helped by some strange choices on Gray’s part. One sequence between him and Mendes in a hotel room, for instance, is crafted and composed in such an off-putting way that whatever the actor might be contributing to the moment is pretty much obscured by the director’s affected technique.

On the technical side, the effort by cinematographer Joaquin Baca-Asay to mimic the gritty appearance of films from the seventies is fairly successful, and he also contributes to the picture’s biggest action sequence, a car chase in a blinding rainstorm that wants to recall the one from “The French Connection.” But the decision to populate the supporting cast with character actors from that earlier period, like Tony Musante, is a miscalculation, simply because they’re too old for the parts. And while casting Ed Koch as himself to add verisimilitude isn’t a bad idea, Hizzoner doesn’t do nearly as well as James Carville did as the governor in “The Assassination of Jesse James by the Coward Robert Ford.”

All the seventies trappings, in fact, merely add to the feeling that “We Own the Night” is old-fashioned in a bad way—an attempt to mimic police dramas from an earlier era that’s more musty copy than compelling revival.