"(R) Four and a half stars 

Martin Scorsese’s The Departed was not the film I thought it would be. I expected an epic about the grand battle between law enforcers and law breakers, a sprawling operatic showcase for the legendary Jack Nicholson and his exceptionally strong supporting cast. What I got instead was a smart, snappy, suspenseful, wildly entertaining and violent as all get out cops and robbers story that affords as much, if not more, attention to young guns Leonardo DiCaprio and Matt Damon than it does to Nicholson.

It’s really good.

Scorsese usually works big. Goodfellas, Casino, Gangs of New York, The Aviator — you know what I mean. The Departed is smaller, more specific, cut from different cloth. With a screenplay by William Monahan (Kingdom of Heaven), the film is an adaptation of the acclaimed 2002 Hong Kong crime thriller Infernal Affairs co-directed by Alan Mak and Andrew Lau Wai Keung and written by Mak and Felix Chong. I haven’t seen the movie, but I intend to check it out.

The Departed is two hours and 32 minutes long and even though I’d been told that the film didn’t drag, I was surprised at how quickly the time sped by. I thought the film hit a lull during a flirtatious exchange between a cop and a counselor, but then I realized the scene simply marked the first time in the movie where Scorsese had eased up on the tension, allowing a little breathing room.

The story, set in South Boston, focuses on two moles, one working for the police, the other working for a mobster. For years, crime boss Frank Costello (Nicholson) has been a mentor for young Colin Sullivan (Matt Damon). Now Sullivan is a police officer in the Special Investigation Unit, a member of the team that is trying to build a case against Costello.

Meanwhile, rookie cop Billy Costigan (Leonardo DiCaprio) gets recruited by smart and steady Capt. Queenan (Martin Sheen) and his bulldog assistant, Sgt. Dignam (Wahlberg), for an extremely daunting task. They will arrange for him to be arrested and jailed for a few months. Once out of jail, he will use his newly won street credibility to infiltrate the Costello gang. For the sake of security, no one on the force except Queenan and Dignam will know the truth.

The plan works. Mr. French (Ray Winstone), Costello’s right hand man, recruits Costigan and, after a nightmarish encounter with the big man himself, the tough young cop becomes part of the crew.

Undercover cop, undercover robber. What a concept. Of course, both sides come to suspect they have a mole in their mists and the search is on. As if all that wasn’t tense enough, the story adds a psychologist named Madolyn (Vera Farmiga) to the mix. Sullivan meets her at work and she soon ends up moving in with him. Costigan must see her as part of his parole and a bond slowly builds between the two. Uh-oh.

By the way, if that sounds like an overdose of coincidence, trust me, when it all rolls out you won’t care.  

With such a stellar cast, it should come as no surprise that the film is stuffed with great performances. Nicholson plays his part large — hell, he chews scenery. You can even see a bit of The Joker at times, but he keeps his character scuzzy and bass enough to maintain credibility despite the theatrical moments.

Nicholson’s character is also anchored by his fellow actors, particularly Leonardo DiCaprio, whose compelling performance is possibly a career best. Matt Damon, who showed his skill with darker characters in The Talented Mr. Ripley and the Bourne films, adds new shadings in his striking work here. The rest of the cast is also rock solid, including Alec Baldwin in a small role, but the big surprise here is Mark Wahlberg, who, after playing breathy, soft-spoken, humble-but-determined types in his last few film, knocks it out of the ballpark here as the smart-mouthed, combative Sgt. Dignam.

As for the music, the cinematography and the editing, what do I need to tell you? This is a Martin Scorsese film. The man is a master storyteller who sometimes gets lost in his own movies. Not this time, though. The Departed makes you feel the tension, the paranoia and, finally, the fatigue of the two moles without ever losing its energy. The shocking violence is well-placed. The action scenes are always comprehensible — no jump cut cheats here — and the suspense will make you fidget in your seat. What a corker.