Tobey Maguire has signed on to star in the indie black comedy The Details, written and directed by Jacob Estes.

According to Variety, Maguire joins Elizabeth Banks in the film about a struggling married couple who, already struggling with issues like infidelity and whether they should stay married, see their lives further complicated by ravenous raccoons burrowing under the sod in their back yard. A disagreement over how to dispatch the pests creates a chain reaction of mishaps that include a murder by bow and arrow

Ray Liotta, Dennis Haysbert and Anna Friel round out the cast and Laura Linney is attached to play an eccentric neighbor.

Maguire steps into a role that James McAvoy held, until a scheduling conflict knocked him out of the picture. Maguire, who had flirted with the role very early on, decided to do the film before making Spider-Man 4 with director Sam Raimi in early 2010.

"Maguire's character is an everyman in the sense that he is composed of a morally ambiguous core," Estes said. "He has good intentions, but he makes a lot of self-destructive mistakes."

Production begins August in Seattle.