"Gone Baby Gone" has the structure and all the trappings of a neo-noir private-eye thriller: betrayals, evasions, corruption and gunfire. But in the end it swats away our narrative expectations and leaves us marooned on a sandbar of moral ambiguity. The picture is a disquieting triumph for its first-time director, Ben Affleck, who also cowrote the script (based on Dennis Lehane's 1998 novel), and for his brother, Casey Affleck, whose muted star performance, following on the heels of his virtuoso turn in "The Assassination of Jesse James by the Coward Robert Ford," suggests that he's on a career roll.

Affleck plays Patrick Kenzie; Michelle Monaghan is his longtime girlfriend, Angie Gennaro. They're private investigators who work the blue-collar streets of Boston's Dorchester district. When a four-year-old girl named Amanda McCready is abducted, they're drawn into the investigation by her agonized uncle, Lionel (Titus Welliver). Patrick and Angie's involvement doesn't sit well with Captain Jack Doyle (Morgan Freeman), the cop in charge of the case, who doesn't feel he needs any help; and it's equally irritating to an abrasive detective named Remy Bressant (Ed Harris, never better).

As a neighborhood boy, however, Patrick is uniquely situated to provide assistance. For one thing, he already knows that Amanda's mother, Helene (Amy Ryan), is a junkie lush and sometime drug mule for a sinister dealer called Cheese (Edi Gathegi), and he learns that she was doing lines in a dive-bar bathroom the day her daughter disappeared. Patrick also has useful connections in the local dope trade, among them a blustery kingpin named Bubba Rogowski (Boston rapper Slain, born to the role). Soon the soft-spoken P.I. is putting two and two together — a big drug rip-off, a grisly torture-murder — but nothing adds up. And the clock is running down — as Doyle points out, kidnapped children who aren't found within a day or two generally aren't found at all, alive anyway. This is day three.

Patrick is a straight arrow in a bent, nasty world, and in a uniquely horrific sequence in the squalid house of a middle-aged cokehead couple (Mark Margolis and the formidable Trudi Goodman), he discovers that he's capable of terrible actions of which he deeply wishes he weren't. Angie tries to reassure him that he's actually done a praiseworthy thing, but Patrick is tormented — and more determined than ever to get at the truth behind the abduction of Amanda McCready, now probably dead. Working his connections, he learns startling things about Doyle, Bressant and Lionel; and when he finally cracks the case, he feels compelled to do something that even Angie can't sanction.

Ben Affleck, a Boston native himself, has infused the movie with a powerful sense of place, from the faces of the people on the streets to the pure Beantown cadences in which they speak. He's expert at handling action, but he's also fluent in the rhythms of intimacy. (Working with a master of low-key emotional detail like his brother helps a lot.) The two most impressive set-piece scenes in the film are both extended monologues: one by Lionel, falling off the wagon in a neighborhood bar as he explains how he wound up doing what we've learned he's done; and the other an electrifying disquisition by Bressant, laying out for Patrick the moral necessity of sometimes doing things that seem completely wrong. ("You gotta take a side," he says. "If you take little kids, if you beat little kids, you are not on my side.")

The end of the picture is both disturbing and enormously deflating — conditioned by years of cinematic narrative conventions, we expect something completely different. The movie's true conclusion, however, takes place in our heads, hours or maybe days later. The uncomforting message is that sometimes doing the right thing can be the very worst thing to do. Are there no other alternatives? That's the disturbing part: sometimes, no.

Read Kurt Loder's review of "30 Days of Night," also new in theaters this week.

Check out everything we've got on "Gone Baby Gone." Visit Movies on MTV.com for more from Hollywood, including news, reviews, interviews and more.

For breaking news, celebrity columns, humor and more — updated around the clock — visit MTVMoviesBlog.com. Want trailers? Visit the Trailer Park for the newest, scariest and funniest coming attractions anywhere.