Kevin James promotes "Kevin Can Wait" in August 2016.

Kevin James promotes "Kevin Can Wait" in August 2016. Credit: Invision/AP / Richard Shotwell

“Kevin Can Wait,” the first network sitcom to be produced on Long Island and which starred a devoted Long Island booster — Kevin James — was canceled Saturday, CBS confirmed. The series lasted just two seasons.

The surprise cancellation came after weeks of deliberation at CBS, which owned the program, but finally came down to the usual suspect — ratings. “Kevin” was the top-rated new sitcom of the 2016 season, but the series lost some 16.5 percent of its audience base over the last season, totaling about 2 million viewers. Because the series is expensive to produce, with James in the starring role and the Long Island production locale, that likely tipped the balance. As is typical with most cancellations, CBS had no comment.

Produced at Bethpage’s Gold Coast studios — a former Grumman facility — “Kevin Can Wait” was initially taped before a live audience and was seen as an important part of the film industry revival on Long Island. Gold Coast had also been the home of an ambitious ABC series, “Pan Am,” which didn’t last a season.

While sophomore slumps are not uncommon with network series, the one that beset “Kevin” was unusually severe and may have been self-inflicted. Before the start of the second season, the show dropped James’ co-star Erinn Hayes, who played his character’s spouse, Donna Gable. Her absence was never fully explained — other than a brief affirmation that she had died — and in her place, Leah Remini was added. Remini had played opposite James on his long-running CBS hit “The King of Queens.”

In the opening seconds of the second season, Kevin Gable — James — was seen in full-beard, presumably meant to signify his mourning process. None of the characters specifically addressed Hayes’ absence until Kevin was seen going through a pile. He said: “You gotta be kidding me. Not again. It’s from your mom’s gym. It’s a postcard. ‘We haven’t seen you in a year. We miss you.’ ” He then said to himself, “So do I.”

And that was largely it. Some viewers revolted, saying her departure had been handled poorly. Hayes had also been a popular character.

In “Kevin Can Wait,” James, 53 — born Kevin George Knipfing in Mineola — played a retired cop, who suddenly had a lot of time on his hands, along with his wife and three kids who were wondering how he was going to fill it.

“Rock [Reuben, the show’s executive producer] and I grew up with a lot of guys on Long Island who were police officers, and who came up from the academy together, then — 20 years later — they retired and were done,” James said during the 2016 TV press tour. “With retirement, you usually think about older guys, but these are in their 40s. They have this dream of what they are going to do every day — race go-karts and spend time with the family and go to Mets games — but life doesn’t always go that way.

“I connected with them because I grew up on Long Island, and they are great guys [but] it is just a matter of finding those elements that make it different” from “King of Queens,” which ended in 2007.

The show represented a TV comeback for James and a significant opportunity for Long Island. James insisted on shooting the series close to his home, despite resistance from CBS, which wanted to tape it on the West Coast.

“You’re [then] one of many that shoot here in Los Angeles,” he said. “[Long Island] it’s something special. . . . It was such a great opportunity [and] the whole Long Island started getting a buzz from this thing” when it was announced.

James cast friends, Long Island standups and even his brother, Gary Valentine, on the series, where he also played Gable’s brother.

He insisted on shooting at “real mom and pop pizza stores that I know and I grew up with,” and during location shoots, he said there was “just a buzz about it that I’ve never felt before, and it’s really exciting. We’re trying to keep it that way. We want to keep it authentic to Long Island. Long Island plays a character in this show, and you see how it just really gives [my character] something to hold on to. It’s exciting for Long Island. I’ve never seen anything like it, honestly.”

The show was initially shot before a studio audience, but the audience was later dropped, presumably due to cost. Long Island also seemed to recede further and further during the second season.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME