Hank Hill has been given a new lease on life, while Homer Simpson’s has been extended by yet another two years.

Fox officially announced last week that it would renew “King of the Hill” for an 11th season, even though the show had halted production more than a year ago. Also, “The Simpsons” has been given a greenlight for its 18th and 19th seasons — keeping TV’s longest-running entertainment series on the air through at least 2008.

With extra episodes already in the can, “King of the Hill” continued to run on Fox this year, even though the show had long ago closed up shop. With no new episodes ordered last year, the show’s writers, vocal talents and production crew had all moved on, and 20th Century Fox TV let go of “King’s” Century City offices.

“The network had made its peace with ‘King of the Hill’ wrapping up,” said Gary Newman, 20th Century Fox TV prexy. “But lo and behold, it showed incredible resilience in terms of ratings. The network realized that the show could still work for them.”

The long lead time for animation forces networks to decide whether to renew a show almost a year before the season starts. When “King” was up for renewal last year, Fox let the deadline pass.

“With any network, you never really know what your situation is going to be a year from now,” said Craig Erwich, Fox exec VP. “The lead time is so long, it’s difficult to make a decision.”

But Erwich said the renewed strength of “Family Guy” — which, like “King,” also was rescued from cancellation and given a second life — and newcomer “American Dad” gave the net reason to take another look at “King.”

“As the year emerged, with the deepening of our animation brand, we realized ‘King of the Hill’ was still creatively vital,” Erwich said. “We talked to the show’s producers, and people still felt like there were stories to tell.”

Insiders said the key negotiation involved bringing back “King” co-creator Mike Judge, who also voices Hank Hill (the show’s lead character). Judge agreed to do it as long as exec producers John Altschuler and Dave Krinsky also returned.

Altschuler and Krinsky, who were working on movie scripts but were still attached to 20th Century Fox TV, agreed to sign on. After that, and with “King’s” other vocal stars back aboard, they brought back many of the show’s former writers.

Reviving an animated series is easier than live action given that the characters don’t age — and the actors playing the roles don’t see it as a big time commitment. The toughest part for 20th Century Fox TV, with so many animated shows in production, has been finding enough directors and artists.

Because of its late start, “King of the Hill” won’t be able to return next year until January at the earliest. That’s fine by Fox, which mostly airs NFL overruns in the fall during the 7 p.m. hour anyway.

“King,” which also was created by Greg Daniels, is now in production on its 11th season. Altschuler, Krinsky, Judge and Daniels exec produce.

As for “The Simpsons,” the order takes the show into its 18th and 19th seasons, making it by far the longest-running comedy in the history of Fox. (“King of the Hill” is now tied with “Married … With Children” for second place at 11 seasons.)

The greenlight also means the 400th episode of “The Simpsons” will air in season 18; it’s tentatively slated for May 20, 2007.

“I’m especially proud because in its 18th year, ‘The Simpsons’ has grown from a surly, unpleasant teenager into a responsible adult,” exec producer Al Jean said.

James L. Brooks and Matt Groening also exec produce “The Simpsons” for Gracie Films and 20th Century Fox TV.