NBC’s rebooted sitcom “Will & Grace” will end after its third season. The final season, comprised of 18 episodes, will air in 2020.

Given an enthusiastic boost by former NBC chairman Bob Greenblatt three years ago, “Will & Grace” was renewed for a second season before its premiere, which debuted to 10 million viewers.

However, ratings declined precipitously over the first season, which was an unrelenting collection of anti-Trump jokes.

Numbers did not improve from there, but the Emmy-winning show — which originally aired on NBC from 1998 to 2006 — had already been renewed for a third season.

Series co-creators Max Mutchnick and David Kohan told The Post last year that the show will have more character — and less presidential — humor going forward.

“It will be topical, but not really, as far as Trump stuff. Because there’s so much craziness happening on a daily basis, by the time this is released it’s weeks later,” Kohan said. “The best stuff is already being done on a nightly basis or at least on a weekly basis with Bill Maher, John Oliver, the late shows and ‘Saturday Night Live.’ We can’t match them for topicality.”

Mutchnick said the new focus was “to move [the characters] forward. Like last year was, ‘OK, we’re back and can still do what we used to do and hope you enjoy it.’ This year it’s, ‘We are all this age and let’s see what comes into our lives at this point.’ ”

Still, the Universal TV comedy lost nearly half its viewers among the advertiser-coveted adults 18-49 demographic last season, The Hollywood Reporter reports. The cast also scored sizable raises (from $250,000 per episode for the first season of the return to $350,000 per for the revival).

NBC is said to be paying $2 million an episode for the comedy.