Six years after he abdicated NBC’s late shift for CBS, David Letterman is returning to the Peacock network … sort of.

NBC has ordered a pilot presentation of “Stuckeyville,” a one-hour comedy/drama from Letterman’s Worldwide Pants label and Viacom Prods.

“Stuckeyville” had languished in development for years at CBS, where it fluctuated between half-hour and hour formats and even went by the title “Ed” for a time.

The project’s first episode was filmed for pilot season last year, but CBS ultimately passed. Worldwide Pants was then free to shop “Stuckeyville” elsewhere.

“Late Show With David Letterman” exec producer Rob Burnett says he was surprised at first when NBC showed interest.

But it’s funny how the latenight wars have mellowed in recent years. Burnett says any past animosity between Letterman’s camp and their former employer had no negative effect in trying to sell the show to NBC.

It probably also helps that most of the key players at NBC and CBS during the heated Letterman vs. Jay Leno battle for “The Tonight Show” have since moved on.

“The Berlin Wall has come down,” Burnett says.

Worldwide Pants expects to shoot “Stuckeyville” in January or February for NBC.

Letterman, Burnett and Jon Beckerman will exec produce, and Burnett and Beckerman serve as writers.

“Stuckeyville” stars newcomer Thomas Cavanaugh as Ed Stevens, a down-on-his-luck guy who loses his job and catches his wife cheating on him on the same day. The character decides to leave the big city and return to his home in rural Ohio.

Besides “Late Show,” Worldwide Pants also produces “The Late Show With Craig Kilborn” and co-produces “Everybody Loves Raymond” along with HBO Independent Prods. “Stuckeyville” would be the production house’s first non-CBS project.

“It’s kind of nice to be in business with a non-family member,” Burnett says.