Justin Theroux is set to star as the lead in HBO's drama pilot The Leftovers for series creator Damon Lindelof.

The project is based on Tom Perrotta's 2011 novel that is set in the aftermath of The Rapture, which doesn't exactly happen like it's supposed to. The story centers around a group of survivors in the suburban community of Mapleton, who try to start a new life after over 100 people suddenly disappeared. Justin Theroux is playing Kevin Garvey, the Mapleton chief of police and father of two who is trying to maintain order in the town.

Damon Lindelof co-wrote the pilot script with Tom Perrotta, and will serve as executive producer and showrunner, if HBO picks up the pilot. Author Tom Perrotta will also executive produce with Ron Yerxa, Albert Berger, Sarah Aubrey, and Peter Berg, who is attached to direct the pilot episode.

The show marks a return to HBO for Justin Theroux, who starred in Sex and the City and Six Feet Under on the cable network. He also had an arc on NBC's Parks and Recreation in 2010.