EXCLUSIVE: William Petersen, who’s been extremely selective in choosing feature roles since leaving “CSI,” is in negotiations along with “Scream 4” star Adam Brody and Rob Corddry to join Steve Carell and Keira Knightley in Mandate Pictures’ “Seeking a Friend at the End of the World.”

In addition to writing the script, Lorene Scafaria is making her directorial debut on the project, which finds an incoming asteroid threatening to end life on Earth.

Carell stars as a man whose wife leaves him amidst the ensuing panic, prompting him to seek out his high school sweetheart, who yearns to be with him when doomsday arrives. Knightley plays the female lead, a neighbor of Carell’s character who accompanies him on a romantic road trip to find her.

Mandate and Indian Paintbrush are co-financing the picture, which is slated to start production later this month. Anonymous Content’s Steve Golin and Joy Gorman will produce with Steven Rales and Mark Roybal of Indian Paintbrush. Mandate’s Nathan Kahane and Nicole Brown will exec produce. WME packaged the project for clients Carell, Knightley and Scafaria.

Petersen, who’s been choosy with roles since leaving “CSI” in January 2009, will soon be seen in Tony Kaye’s education drama “Detachment,” which recently screened at the Tribeca Film Festival.

As Variety first reported, Brody just signed on to star in the indie “Hemlock Drive” with Susan Sarandon. He next stars opposite Greta Gerwig in Whit Stillman’s “Damsels in Distress,” and has also wrapped Julian Farino’s indie dramedy “The Oranges.”

Corddry last appeared as a hotshot insurance salesman in Fox Searchlight’s “Cedar Rapids.” He recently wrapped The Weinstein Co. comedy “Butter.”

Scafaria’s sole feature credit was on Mandate’s 2008 comedy “Nick and Norah’s Infinite Playlist.” She’s also written for Corddry’s Cartoon Network series “Children’s Hospital.”

Mandate and Indian Paintbrush recently teamed on Jason Reitman’s “Young Adult,” which will be released by Paramount.

Petersen and Brody are repped by UTA, while WME and Principato-Young Entertainment rep Corddry.