Grade: B+

Ben Affleck has limitations as an actor, but in this debut feature he shows real talent in the director’s chair (his writing ability had already been well documented in “Good Will Hunting”). “Gone Baby Gone,” based on a novel by Dennis Lehane (“Mystic River”), is a Boston-set tale of the investigation that follows upon an apparent child abduction. The plot takes a decidedly implausible turn in the last act that undermines the film’s overall impact, but that’s less Affleck’s fault than Lehane’s. And as compensation he draws excellent performances, not least from his talented brother, and creates a sense of place that’s almost palpably authentic, particularly in the picture’s first hour.

The plot begins with the kidnapping of the angelic-faced Amanda from the apartment of her drug-addict single mother Helene McCready (Amy Ryan). Her uncle Lionel (Titus Welliver) and his wife Bea (Amy Madigan) approach neighborhood investigator Patrick Kenzie (Casey Affleck) and his partner-girlfriend Angie Gennaro (Michelle Monaghan) to take on the case, which irritates the hardened detectives assigned to it—Remy Bressant (Ed Harris) and Nick Poole (John Ashton)—as well as their boss Captain Doyle (Morgan Freeman), the head of the Crimes Against Children unit, and a man whose own daughter was taken and killed years before. The search, which involves bruised egos on both sides, eventually leads to Helene’s drug associates, especially her strung-out boyfriend and a local distributor from whom they stole some money. But in the event the attempt to save the girl by exchanging the cash for her seems to end tragically.

At this point, though, “Gone Baby Gone” is barely half over. The film now takes an unexpected turn that brings Kenzie into very dark, conspiratorial waters, challenges him with a split-second, life-or-death decision, and ultimately compels him to reach a very difficult choice about a child’s welfare—one that will also have serious implications for his own future. It wouldn’t be fair to the film to reveal too many of the details, but suffice it to say that the twists take the picture into increasingly bleak territory that will turn off some viewers; the ending, in particular, will probably strike many as not just downbeat but unsatisfying. It must also be added that from a purely dramatic standpoint, the convolutions of the plot’s later stages strain credulity (and aren’t played with the same degree of conviction evident in what’s preceded—a reflection, perhaps, of the makers’ lack of confidence in them).

But even such criticisms suggest the serious undertones at work in “Gone Baby Gone.” It’s not merely a procedural about a young girl’s abduction; it’s a thoughtful piece that raises acute moral issues in its later stages, from both a personal and a social perspective. In that respect it’s not unlike “Million Dollar Baby,” though it doesn’t manage the turn from pure storytelling to ethical dilemma quite so smoothly.

And there’s so much that’s fine in the film that its flaws recede in importance. As writer and director Affleck, with the aid of production designer Sharon Seymour, art director Chris Cornwell and cinematographer John Toll, captures the Boston neighborhood feel unerringly, and along with editor William Goldenberg he paces the story remarkably well. He also secures some remarkable performances, most notably from his brother Casey, who adds to his portfolio of austere, slightly hesitant young men (most recently in “The Assassination of Jesse James”) with this understated but powerful turn, and Harris, who follows up his astonishing work for David Cronenberg in “A History of Violence” with this equally powerful portrait of a cop on the edge. The rest of the cast is good but not at their level, with Ashton and Madigan making especially strong impressions. Only Freeman, coasting along on his natural authority and that rich voice of his, seems to be working at less than ideal intensity. Perhaps he’s just played God too often.

There’s a danger in overpraising “Gone Baby Gone.” It’s a small film, told on a small scale, and stylistically rather a modest, unassuming one. But its quiet, understated approach to what could be a simply lurid topic is compelling, and by the close it raises troubling ethical questions that you should appreciate confronting even if you disagree with the answers its characters reach. And it serves as a showcase for some really striking performances. As such it’s a triumph for both of the Affleck brothers.