Jerry Lewis, the brash slapstick comic who became a pop culture sensation in his partnership with Dean Martin and then transformed himself into an auteur filmmaker of such comedic classics as “The Nutty Professor” and “The Bellboy,” has died in Las Vegas. He was 91.

Lewis died at his home in Las Vegas at about 9:15 a.m. Sunday morning, his agent confirmed.

For most of his career, Lewis was a complicated and sometimes polarizing figure. An undeniable comedic genius, he pursued a singular vision and commanded a rare amount of creative control over his work with Paramount Pictures and other studios. His legacy also includes more than $2.5 billion raised for the Muscular Dystrophy Association through the annual Labor Day telethon that he made an end-of-summer ritual for decades until he was relieved of the hosting job in 2011.

But Lewis’ brand of humor did not always wear well as times and attitudes changed. Over the last 10 years of his life, his reputation soured slightly as he was forced to apologize for making a gay slur on camera during the 2007 telethon, continued to make racist and misogynistic jokes, and didn’t hesitate to share his right-wing political views.

In addition to his most famous films, Lewis also appeared in a number of notable works, such as Martin Scorsese’s “The King of Comedy,” but was largely offscreen from the late ’60s on and was more active with his telethon and philanthropic efforts. As late as 2016, Lewis continued to perform in Las Vegas, where he first debuted his comedy routine back in 1949.

The high regard in which his comic abilities were held in France — he received the Legion of Honor award in 1983 — became a running joke in the U.S. long after Lewis’ style of broad physical comedy fell out of fashion. His final film, “Max Rose,” screened at France’s Cannes Film Festival in 2013.

The telethon, like other aspects of Lewis’ life, was beset by controversy. The comic’s offstage persona was anything but humorous. He was, by his own admission, an impatient man, and over the years battled numerous illnesses and a prescription drug dependency. His parting with Martin in 1956 after 10 years as a duo was acrimonious. And the telethons were awash in claims that there was a disparity between the money pledged and the money collected.

Lewis’ pairing with Martin, featuring their improvisatory backbiting and physical chicanery, was an instant hit in 1946. When producer Hal Wallis saw them performing at the Copacabana and at Slapsie Maxie’s in Hollywood, he saw the potential for a new Bob Hope and Bing Crosby and signed them to a Paramount Pictures contract.

For the next 10 years, Martin and Lewis turned out one silly film after the next starting with “My Friend Irma” in 1949 and including “The Caddy,” “The Stooge,” “Artists and Models” and “Pardners.” None of their films grossed less than $5 million, a handy sum in those days.

The premises of the films grew tired, and the more Martin and Lewis worked together, the more disparate they appeared. In 1956, after their film “Hollywood or Bust,” they made their last dual appearance at the Copacabana.

By the time of their breakup, Martin had a prosperous career as a recording artist and actor. And soon Lewis, too, was a hot solo ticket.

Shortly after they broke up, Lewis filled in for an ailing Judy Garland in Las Vegas. Over the next five years Lewis developed a slicker, more sophisticated stage persona and would continue to play Vegas until 2016.

Onscreen he made a go of it in such films as “The Delicate Delinquent” and “Rock-a-Bye Baby.” Lewis even had a million-selling single in the “Rock-a-Bye Your Baby” title track, which led to several albums on Decca Records.

He then extended his efforts into writing, producing and directing films, signing what was then a mammoth $10 million deal with Paramount. The first two, 1961’s “The Ladies Man” and 1962’s “The Errand Boy,” showed him at his best. His talents also dovetailed with director Frank Tashlin’s style in films such as “Cinderfella” and “The Disorderly Orderly.”

“The Nutty Professor” (1963) was his biggest success ever, grossing $19 million. But by then his mugging and exaggerated body gyrations had become out of control, as had the syrupy moments in his films.

Lewis signed a nonexclusive deal with Columbia that resulted in several uninspired films such as “Three on a Couch,” “The Big Mouth” and “Don’t Raise the Bridge, Lower the River.” Even Lewis had to admit, “Jerry Lewis is never just OK or adequate; he’s either very funny or he’s awful.”

While Americans largely dismissed him, Lewis had developed a following at French film journals Cahiers du Cinema and Positif.

He was born Joseph Levitch in Newark, N.J. Both his parents were in show business and, at the age of 5, Lewis made his debut at a Borscht Belt hotel singing “Brother Can You Spare a Dime?”

Perhaps because his parents spent a great deal of time on the road, Lewis was demanding attention through humor by the time he was attending Irvington High School in New Jersey. By age 15 he was pantomiming operatic and popular songs and was booked into a burlesque house in Buffalo.

In 1942 he tried out his comic pantomiming at Brown’s Hotel in upstate New York, where he was also working the summer as a bellboy. Comic Irving Kaye was sufficiently impressed to land Lewis some bookings and became his road manager.

Lewis met the young singer Dean Martin at New York nightclub the Glass Hatt and was first paired with him in 1946. Afters years of rupture, Martin made a surprise appearance on the Muscular Dystrophy Telethon in 1976, a reunion orchestrated by their mutual friend Frank Sinatra. The pair also reconciled after the death of Martin’s son in the late 1980s. Martin died in 1995.

In the early ’70s he continued to direct uninspired fare such as “Which Way to the Front?” and then tried a serious film, “The Day the Clown Cried,” though he famously shelved the completed work (some footage of it finally surfaced in 2013). He attempted a live TV variety show that failed, as did an attempt at a Broadway musical, “Feeling No Pain”; it was followed by the acrimonious “Hellzapoppin,” which was ditched out of town in Boston at a loss of $1.25 million.

In 1972 he lent his name to a string of 200 movie theaters for Network Cinema Corp., which led to bankruptcy proceedings in 1974. His heavy schedule also brought him to the verge of a nervous breakdown, serious ulcer problems and painkiller drug dependency. In 1982 he had double-bypass heart surgery and gave up his four pack-a-day smoking habit.

Lewis was offscreen until 1979’s low-budget “Hardly Working,” which he also directed; it did not reverse his fortunes. But in 1982, director Martin Scorsese harnessed the brash, cynical side of Lewis’ persona for the role of a kidnapped latenight talkshow host in “The King of Comedy.” Though he reportedly resented being upstaged by Robert De Niro and Sandra Bernhard, the film represented some of Lewis’ finest work. Another high point was a similarly caustic appearance as a lethal underworld figure on the TV series “Wiseguy.”

Most of his later film work, however, failed to impress, such as “Slapstick of Another Kind,” “Cookie” and 1992’s “American Dreamer.”

In 1995, he appeared in Peter Chelsom’s film “Funny Bones” and took over the role of the devil in a Broadway revival of “Damn Yankees,” which he took on tour in the U.S.; he then appeared in a London production of the musical.

In 2003 he provided a guest voice on an episode of “The Simpsons”; in 2006 he did an episode of “Law and Order: SVU” in which he played the insane, morally befuddled but bizarrely benevolent uncle of Det. John Munch (Richard Belzer).

Lewis long sought to create a sequel to “The Nutty Professor”; eventually, Imagine Entertainment produced and Universal released the 1996 remake starring Eddie Murphy on which Lewis was credited for the screenplay to the 1963 version and as an executive producer.

Lewis also hoped to bring a musical adaptation of “The Nutty Professor” to Broadway. By summer 2012 an ailing but still enthusiastic Lewis made his stage helming debut with such a musical, with a score by Marvin Hamlisch and a book and lyrics by Rupert Holmes, in Nashville, where it played for seven weeks.

In 2013 Lewis starred in the long-gestating project “Max Rose,” written and directed by Daniel Noah and also starring Claire Bloom, Kevin Pollak, Kerry Bishe and Mort Sahl. Lewis played a jazz pianist who recently became a widower.

In 2009, Lewis received the Academy of Motion Pictures Arts & Sciences’ Jean Hersholt Award for his charitable work. In May 2014, he added his footprints to those of other screen luminaries at the Chinese Theatre.

In 1944 Lewis married former band singer Patti Palmer, with whom he had six sons, Gary, Ronnie, Scott, Anthony, Christopher and Joseph, who died in 2009. Gary for a time had a rock career as the lead singer of Gary Lewis & the Playboys. The marriage ended in divorce.

He is survived by his second wife, SanDee Pitnick, with whom he adopted a daughter.