Adult Swim has locked in its top-rated franchise for another two seasons, handing a whopping 40-episode order to “Robot Chicken.”

The mega-renewal keeps “Chicken” on the channel for a fifth and sixth season.

Stop-motion animation/comedy series reps the highest-rated original program for Adult Swim, the nighttime sister to Cartoon Network.

Seth Green and Matthew Senreich co-created “Chicken” and serve as exec producers. Green said he was pleasantly surprised by the major commitment from Adult Swim.

“It’s kind of amazing,” Green said. “We never expected to do a second season, let alone a fifth and sixth. We’re really busy, but we’re still having a lot of fun making it.”

“Chicken” takes on pop culture, frequently poking fun at TV and film franchises. The show even produced two “Star Wars”-themed specials, featuring voice talent from the features.

“Robot Chicken” has scored two consecutive Emmy noms for outstanding animated program, while Green landed a nod for outstanding voiceover performance. Show has also won four Annie Awards.

“Chicken,” which bowed in February 2005, has also helped make Adult Swim a strong late-night player among young men. The pickup comes just as NBC irons out its latenight mess — a coincidence not lost on Green.

There’s an enormous trend in that, as cable networks come up with counterprogramming to the chatshows,” he said.

Green and Senreich exec produce “Chicken” for their Stoopid Monkey Prods. banner. Alex Bulkley and Corey Campodonico’s ShadowMachine Films is also behind the show.

Green and Senreich also write the series, along with head writers Tom Root and Douglas Goldstein and their staff; the duo directs with Chris McKay.

Huge orders like Adult Swim’s commitment to “Robot Chicken” are rare in cable, where 13-episode seasons are still a norm. (“Chicken” has traditionally produced 20-episode seasons.)

But cablers are increasingly making big bets on signature series, in order to more quickly stock their series libraries. FX, for example, picked up 39 episodes of “It’s Always Sunny in Philadelphia” in one swoop, while TBS has acquired full 100-episode orders of Tyler Perry’s “House of Payne” and “Meet the Browns.”

UTA handled the deal.