Fox has ordered 13 episodes of Backstrom, a one-hour drama based on novelist Leif G.W. Persson’s hit series of books of the same name that will star Rainn Wilson. Created and executive-produced by Hart Hanson (Bones), the series centers on Det. Everett Backstrom, an offensive, irascible detective, as he tries, and fails, to change his self-destructive behavior.

“Hart Hanson and Rainn Wilson are the perfect combination of creative vision and on-screen talent to bring this one-of-a-kind character and story like Backstrom to Fox,” said Kevin Reilly, Fox Chairman of Entertainment, in a statement. “I’ve been in business with Hart for a long time, and not only does he have a rare gift for infusing darker themes with relatable humor, he’s one of the best showrunners out there today. Together with Rainn – who absolutely nails this role and makes it a classic FOX character – I think we’ve got something really special here.”