Ricky Gervais is back in business at HBO, which has just ordered an animated series based on his popular series of podcasts.

“The Ricky Gervais Show” features Gervais and his longtime collaborator Stephen Merchant (who were behind HBO and BBC’s “Extras”) — and revolves around the world of their unusual friend, Karl Pilkington.

Media Rights Capital is producing the show, along with Wildbrain, the animation house behind “Yo Gabba Gabba.” HBO has picked up 13 half-hour episodes, which will likely bow in early 2010.

“The Ricky Gervais Show” started out as a radio program in London; in 2005, Gervais and Merchant decided to turn it into a podcast — and brought Pilkington, a radio producer they had met years earlier — along. The podcasts began to focus particularly on the eccentric mind of Pilkington.

“They find him to be the funniest person in the world,” MRC’s Modi Wiczyk said. “Ricky says Karl is like crack to him.” According to Gervais and Merchant, “Karl is a man who believes that a sea lion is a cross between a fish and a dog. Hopefully, Karl will enter the pantheon of animated greats.”

The podcast became wildly popular — and even scored a Guinness World Record in 2007 for being the most-downloaded podcast on the Internet.

Fans even began animating some of Pilkington’s musings themselves, uploading the shorts to the Internet. It was Wildbrain development VP Lisa Ullmann who first put the idea of an animated version in Gervais’ head.

“It’s such a natural for animation,” Ullmann said. “We worked closely with (Gervais) figuring out how he wanted himself to look, as well as Steven and Karl.”

Show will utilize the audio from the “Gervais” podcasts and open each week with the animated version of the trio. Then, once Pilkington begins telling one of his unusual stories, the animation will delve into those worlds.

MRC is fully financing the show and will take it to the international market shortly. Animated series is their second at HBO, along with “The Life and Times of Tim.” It also extends MRC’s relationship with Gervais; the company is producing his feature “The Invention of Lying” for Warner Bros.

Gervais, Merchant and Pilkington will exec produce, along with Wildbrain’s Bob Higgins. Ullman will be co-exec producer, while Wildbrain’s Craig Kellman is animation director.

The producers expect to deliver “The Ricky Gervais Show” to HBO by the end of the year.