Legendary funnyman Jerry Lewis — whose slapstick antics with actor Dean Martin and tireless efforts to fight muscular dystrophy made him a household name for generations — died Sunday.

The Newark, NJ, native was 91. Lewis died of natural causes at his Las Vegas home, with his family by his side, according to his publicist, Candi Cazau.

“Jerry was a pioneer in comedy and film. And he was a friend,” said acting great Robert De Niro, a co-star with Lewis in the 1982 Martin Scorsese film “The King of Comedy.”

“I was fortunate to have seen him a few times over the past couple of years,” De Niro said. “Even at 91, he didn’t miss a beat. Or a punchline.”

Lewis was born Joseph Levitch on March 16, 1926, to a pianist mom and music-arranger dad. He appeared in their vaudeville act at age 5.

After dropping out of high school, Lewis worked as a soda jerk and theater usher while refining his comedy act — the beginning of a career that soared after he met Martin at age 20.

Lewis proved to be the perfect foil to the suave Martin’s “King of Cool” persona. The pair began playing clubs — and at one point, in the summer of 1948, had lined up not one but two of the biggest gigs in the country, both in Manhattan: They were headlining the Copacabana on the Upper East Side as well as the Roxy Theatre in Times Square.

The comic coupling dominated the early days of TV and headlined movies such as “Scared Stiff” in 1953, “The Caddy” in 1953, “Living It Up” in 1954 and “Hollywood or Bust” in 1956.

Lewis’ goofy, far-from-high-brow hilarity made him a favorite of audiences.

But while he was a megastar in the US, his popularity overseas knew no bounds. The “ Nutty Professor” star was eventually honored with France’s Legion of Honor award in 1983. He wore slippers to the awards ceremony.

Lewis once said he hoped that his antics helped pull France into a better place in the decades after World War II.

The nation’s sense of humor “took France through all those difficult years and will take it through difficult times now because the French are not afraid to laugh,” Lewis observed.

But later generations knew Lewis for another kind of work — as the frontman for the Muscular Dystrophy Association and its Labor Day weekend telethon. Lewis hosted the event from 1966 to 2011, having raised $2.45 billion, the group said. He was even nominated for a Nobel Peace Prize for his efforts.

“Though we will miss him beyond measure, we suspect that somewhere in heaven, he’s already urging the angels to give ‘just one dollar more for my kids.’ Thank you Jerry, you are our hero. God bless you,” said MDA Chairman Rodney Howell.

The MDA’s kind words about Lewis stood in stark contrast to the comic’s abrupt and bitter end to hosting the iconic fundraiser. He was suddenly bumped out in 2012 and denied a farewell show. Lewis loathed to discuss the ouster and never gave an extended interview on the matter.

In the weeks immediately after the MDA-Lewis divorce, the comic’s protege, Richard Belzer, explained how deeply wounded his pal was.

“This was a hurt man,” said Belzer. “It was a moral outrage, a p.r. nightmare and a sad commentary on this incredible philanthropic career.”

The telethon had done more than make Lewis a household name for a whole new generation; it also helped heal a rift between him and his old pal, Martin. Both went on to enjoy big careers even after they broke up in 1956, but there was still bitterness.

“I hated him for allowing the split to happen. He hated me for allowing the split to happen,” Lewis said in 2005.

Lewis found his solo groove in movies such as “The Bellboy” in 1960 and “The Nutty Professor” in 1963, becoming one of Paramount Pictures’ most bankable male leads.

Lewis’ star power even carried on without him on film, as “The Nutty Professor” would later become a hit for Eddie Murphy with a 1996 remake and 2000 sequel.

But Martin appeared on Lewis’ telethon in 1976 after singer Frank Sinatra, a mutual friend of the pair, brokered a deal.

In his 2006 book “Dean & Me (A Love Story),” Lewis recalled going to the funeral of Martin’s son, Dean Paul Martin, in 1987, during which his one-time comedy partner poured his heart out.

“He called me, and we talked for a couple of hours. He sobbed for the first time I’d ever heard. He said, ‘Don’t you understand? I just lost one of the only two male loves I had in my life. Him and you,’ ” Lewis said.

“That was the first time he had said that or ever related to loving me. He showed it enough, it was just difficult for him to say.”

Martin died in 1995 at the age of 78.

Lewis was married to Patti Lewis for 36 years before they got divorced. They had six sons, including musician Gary Lewis, who formed Gary Lewis & the Playboys and recorded the hit “This Diamond Ring” in 1965.

Lewis married second wife Sandra Pitnick in 1983. They have an adopted daughter, Dani, named in honor of Lewis’ dad.

He battled a laundry list of health issues in the past four decades but managed to hang on for years.

Lewis overcame open-heart surgery, a bout with prostate cancer, diabetes, viral meningitis, pulmonary fibrosis and debilitating depression.

But he still kept working. Lewis played the devil in a 1990s Broadway revival of “Damn Yankees.” He also did a series of wildly popular one-man shows in 2014.

He was the star of the independent movie “Max Rose,” released in 2016.

Magician Penn Jillette on Sunday tweeted a recent picture of Lewis smiling and shaking his hand, writing: “How did my life get good enough that Jerry Lewis would smile at me? And how sad to lose him.”

With Post wire services