It's a biographical legend that's rooted in fact: When Martin Scorsese was a child, he wasn't in the best of health ... so he went to the movies a lot, and he saw everything. It's easy to believe -- just watch Scorsese's documentaries on American and Italian cinema and you can witness a well-rounded, genre-spanning love of film in action. But if you watched everything, you probably saw a lot of bad movies -- or, worse, indifferent ones. I'd bet that Scorsese, in his youth, saw a thousand B-movie cop-and-crook films with only one or two glimmerings of style in their entire running time -- a camera shot that stood out, a bitterly-spat line, a relationship that twists like a knife in your hand. And he's turned those crime films -- indeed, he's turned every crime film -- into a hard-boiled, fast-paced, brutish and brooding action thriller, The Departed.

And the irony is that as much as The Departed includes nods to all crime cinema, it's a remake of one specific film -- the Hong Kong actioner Infernal Affairs. The pitch, which crossed the ocean intact, is simple and yet diabolical: The police have a man undercover in the organization of the local crimelord. The local crimelord, being a man of vision and long-term thinking, has a man undercover in the police. Each organization is aware that there's a leak, somewhere, somehow. The two men undercover are aware that they have to find their opposite number before they themselves are found out. The police and crooks each have intelligence from the other, but using it might expose their source. In terms of construction, The Departed's not terribly complicated; neither is a hammer, but you can swing it pretty hard if you know what you're doing.

And rest assured, Scorsese knows what he's doing, from the swift economy of the scenes setting up the film's Boston setting to the glide of the opening narration, delivered by Jack Nicholson's crime lord: "I don't want to be a product of my environment; I want my environment to be a product of me." And all through The Departed, Scorsese's directing like a surgeon: He knows where to cut, he knows how to work and he's not afraid of a little blood, either. Nicholson's Frank Costello is an old-fashioned Irish Mafiosi, and he reaches out to young Colin Sullivan; when Colin grows to be a man (and played by Matt Damon), he's off to the state police academy, where he graduates with flying colors, serves with distinction ... and is completely in thrall to Costello. Another police trainee, Billy Costigan (Leonardo DiCaprio) has great test results and a baffling psych profile -- so top cops Queenan (Martin Sheen) and Dignam (Mark Wahlberg) offer him a unique assignment: Screw up. Get in a fight. Go to jail. Work your way into Costello's organization. ...

The joke about Infernal Affairs was that it was the John Woo movie John Woo never made -- divided loyalties, masquerades that have to withstand lethal scrutiny, the question of what makes a cop and what makes a criminal. The Departed has much of that as well, and the irony is that after making two films that almost got on their knees and begged to be regarded seriously, The Gangs of New York and The Aviator, Scorsese's made a little potboiler of a thriller that winds up being a more compelling movie than the two intended masterworks. And, much like The Gangs of New York., I'd love to see a version of The Departed with an extra hour of footage -- Does Sullivan like being a cop? Is Costigan remorseful over men he's killed (or caused to be killed) in Costello's service? It's not that The Departed has no character moments -- watch carefully for how telling brief reactions to a family photo are for the two leads -- but rather that the ones there make you hunger for more. But even at two and a half hours, The Departed can't stop moving, can't stop going, can't stop pushing the plot towards the big finale. And that's actually perfect; it's rare to have a movie this lean, this mean, one that makes violent death look as scary as it truly is and still has the grim laughter of the gallows.

A lot of that credit goes to William Monahan's screenplay adaptation; it's bluff, rough and funny stuff, foul and frank in equal measure. Touring a new apartment, the agent pitches Sullivan: "You move in here, you're upper class by Tuesday." Giddy over a wiretap, Sullivan's boss Ellerby (Alec Baldwin) punches shoulders with glee: "Patriot Act, Patriot Act, I love it, I love it, I love it. ..." There's nothing too brilliant in the screenplay for The Departed, but there's a lot that's clever: A Mexican standoff that takes place over cell phones, or the way Sullivan and Costigan can both be seen thinking their way through dilemmas -- Who knows what? How can I get away with this? Who can take the blame? Which lie did I tell?

There are flashes of brilliance in the direction, of course; how could there not be? Working yet again with editor Thelma Schoonmaker and director of photographer Michael Ballhaus, Scorsese manages to fill the movie with visual velocity -- a millisecond-long moment of a shot glass hitting a bar beside a Budweiser bottle, or a sequence shot inside a character's pocket as they frantically try to work their cell phone blind as a lifeline to avoid death.

A truly great B-movie is, at heart, a B-movie; Scorsese, to his credit, doesn't shy away from the pulp and preposterousness of the film's pitch but insteads shapes the force of it and works with it. A film like this demands that there be a woman who knows both men, and here it's a police psychiatrist played by Vera Farmiga. Farmiga's done awe-inspiring work in unseen films like Down to the Bone and Dust; here, like all the other actors, she's playing an archetype, not a role, and she does so superbly. All the actors here are recycling a little bit -- DiCaprio's tormented-striver act from almost every film he's made; Damon's uneasy impostor from The Talented Mr. Ripley; Nicholson's satanic disheveled smirk from much of his recent work. (So's Scorsese; there are plenty of nods to his own canon here, with one to Mean Streets in the first two minutes, and one to Goodfellas in the last two and plenty more between.) You get the sense that Scorsese cast faces, not actors, and he cast them in parts, not roles -- and isn't that ultimately what old-school Hollywood was all about?

Which is what, for all of its bluff bluster, The Departed essentially is: An old-fashioned crime movie. But goddamn, it's an exciting old-fashioned crime movie, and it's one made by a master. I'm sure there are going to be deeper political readings of The Departed -- old men, comfortable in their power, sending young men off to do their dirty work and possibly die -- but that strikes me as an exercise in futility like hunting for nutrition in a twinkie: There may be something there, but it sure wasn't the priority when it was being made. If you like action, don't mind copious amounts of blood and want to see a rousing, solid thriller with the courage to be no more than what it is and the talent to be what it is superbly, The Departed will stand as the kind of pleasure you rarely get at the movies A movie from a director who suceeds as both an artist making entertainment and as an entertainer who knows how to create art. .