OK, it is probably a cheap shot to say that Gone Baby Gone is so good you cannot believe it was directed by Ben Affleck. But, notwithstanding his marble-mouthed acting legacy, the last time Affleck was credited with co-writing a feature film he won an Oscar for Good Will Hunting. Affleck makes his directorial debut 10 years thence, and a funny thing happens on the way to the Razzies: He generates a film that is taut, thought-provoking and one of this year’s best.

With first-time screenwriter Aaron Stockard, Affleck adapts author Dennis Lehane’s novel about the search for a kidnapped 4-year-old girl living in Boston’s Dorchester neighborhood, the setting for most of Lehane’s books. Frustrated by police ineffectiveness and the seeming indifference of the girl’s drug-addicted mother (Amy Ryan), family members desperately turn for help to private investigator Patrick Kenzie (Casey Affleck), a baby-faced gumshoe in tennis shoes whose self-described job is to “find people who started in the cracks, and then fell through.”

While much of the exterior footage could be confused with outtakes from Clint Eastwood’s film adaptation of Lehane’s Mystic River, Gone Baby Gone benefits from the experience of the Brothers Affleck’s nearby Cambridge, Mass., upbringing. Unlike Mystic River, the dialogue here dances with a hardscrabble, indigenous cadence, complemented by Affleck’s liberal use of on-location interior filming.

Like Roman Polanski’s Chinatown, the storyline to this neo-noir ultimately revolves around the fate of a young girl caught against a backdrop of deception and corruption. Tension flows from the combustible ethnic, political and socio-economic forces at work. Along the way, director Affleck examines the shades of gray with provocative objectivity: e.g., a cop played by Ed Harriswith full-bloom blustergives an impassioned and lucid justification for having once planted evidence on a known crack dealer.

While the plot threads become greatly entangled during the film’s final third, they are also essential for setting up Patrick’s climatic Hobson’s choice, when he is left to contemplate an apparent Pyrrhic victory and its effect on the fate of both himself and his charge. Forget it, Patrick; it’s Beantown.