Will Ferrell is producing and starring in the CBS Films comedy “The 100 Year-Old Man.”

The project is based on bestselling author Jonas Jonasson’s “The 100 Year-Old Man Who Climbed Out the Window and Disappeared.”

Ferrell is producing the film with partners Adam McKay and Jessica Elbaum via their Gary Sanchez shingle alongside Andy Licht and NiceFLX Pictures’ Pontus Edgren and Mikael Wallen. Felix Herngren and Henrik Jansson-Schweizer will serve as executive producers, and Joshua Mehr will co-produce.

Jason George (“Narcos”) is set to write the screenplay. No director is yet attached.

“The 100 Year-Old Man Who Climbed Out the Window and Disappeared” has sold more than 10 million copies worldwide since it was published in 2012. The 2013 Swedish version of the movie, which received an Academy Award nomination for best makeup and hairstyling, is the third-highest grosser of Swedish movie of all time with $50 million in worldwide box office.

Ferrell will play a man named Allan who escapes from a nursing home on his 100th birthday. His time on the run reveals that he took part in several defining events of the 20th century. In the Swedish movie, his character had encounters with President Harry S. Truman and atomic bomb developer Robert Oppenheimer.

“My character, Allan, knows the art of being funny just by being,” said Jonasson. “That is something Will Ferrell masters to perfection. Great humor with small measurements. I am happy that Allan is now in his hands.”

Gary Sanchez has produced many of Ferrell’s comedies dating back to 2008’s “Step Brothers” and including “The Other Guys,” “The Campaign,” “Anchorman 2: the Legend Continues,” “Get Hard,” “Daddy’s Home” and “The House.” The company’s producing the upcoming “Daddy’s Home 2” and “Holmes and Watson.”

UTA, Mosaic, and Deborah Klein represent Ferrell and Gary Sanchez. ICM, Kaplan Perrone, and Gang Tyre Ramer & Brown represent George. Klein represents Licht. Linda Lichter and David Jelenko of Lichter, Grossman, Nichols, Adler & Feldman negotiated the book rights and producing deal for NiceFLX Pictures. Mark Ross and Alex Ginno are overseeing the project for CBS Films.