Coming home from hard time on car-robbery charges, Mark Wahlberg rides the New York City rails, an image that turns out to be cruelly prescient in The Yards, James Gray's solid, classically constructed crime thriller. Wahlberg, an innocent man who took the fall for his buddies, is looking for a fresh start, but with so few options for ex-cons in the working world, there's a reason a single crime can morph into a life of crime. Desperate for money to pay the rent and take care of heart-diseased mother Ellen Burstyn, he appeals to shady uncle James Caan, owner of the Electric Rail Corporation, an operation that makes and repairs subway trains. Caan offers him a job as a machinist, a skill requiring two years of training school, but Wahlberg's only real option is to join cousin Joaquin Phoenix and his band of palm-greasers and thugs on the crooked end of the business. In order to win lucrative government contracts, Phoenix works to undermine Electric Rail's minority-owned competitor by sabotaging its trains and ruining its safety record. But when his operation backfires one night, leaving a yardmaster dead and an overzealous cop in a coma, Wahlberg is pinned for the crime and sent into hiding. Step by calamitous step, the events in The Yards proceed with a dreadful logic, drawing the hero into a tragic scenario he has no power or leverage to resist. Gray, who made his debut with the bleak determinist crime drama Little Odessa in 1994, treads on similar terrain here, but if the material suffers from familiarity, his direction is sure-handed and elegant, almost stately in its epic sweep. Although a couple of the relationships fail to pan out, particularly a rote love triangle involving Caan's daughter (Charlize Theron), Gray's depiction of big-city corruption is marvelously detailed. As he proved with Odessa, he's especially skilled at sustaining a somber, foreboding mood. And, in the midst of showier performances by Caan—finally claiming the position his character vied for in The Godfather—and Phoenix, whose eyes seem to swallow the light, Wahlberg's quiet, self-effacing presence in the lead is likely to go unnoticed. But his subtle turn sets the tone for The Yards, elevating it from an ordinary crime yarn to a grand, enveloping piece of storytelling.