From the network and president that brought you The Affair….

Showtime has bought the rights to “The President Is Missing” — which former President Bill Clinton is writing with actual author James Patterson — and plans to turn it into a series, the company announced Friday.

“I’m really enjoying writing this book and working with Jim. And I can’t wait to see Showtime bring the characters to life,” Clinton said in a statement.

The book is slated to hit airport bookstore shelves in 2018, and is described as “a gripping tale of power and betrayal, with a unique perspective on the pressures and stakes faced by a sitting president.”

Clinton flew to LA last month to personally pitch the story to Hollywood, according to Deadline.

Competition was fierce, but the CBS-owned cable network beat out at least eight rivals — including Netflix and Ron Howard — all offering in the “low to mid-eight figure range,” because chairman Les Moonves is pals with both Clinton and Patterson, Variety reports.