Gene Wilder, the frizzy-haired actor who brought his deft comedic touch to such unforgettable roles as the neurotic accountant in “The Producers” and the mad scientist of “Young Frankenstein,” has died. He was 83.

Wilder’s nephew said Monday that the actor and writer died late Sunday at his home in Stamford, Connecticut, from complications from Alzheimer’s disease.

Jordan Walker-Pearlman said in a statement that Wilder was diagnosed with the disease three years ago, but kept the condition private so as not to disappoint fans.

“He simply couldn’t bear the idea of one less smile in the world,” Walker-Pearlman said.

Wilder started his acting career on the stage, but millions knew him from his work in the movies, especially his collaborations with Mel Brooks on “The Producers,” ”Blazing Saddles” and “Young Frankenstein.” The last film — with Wilder playing a California-born descendant of the mad scientist, insisting that his name was pronounced “Frahn-ken-SHTEEN” — was co-written by Brooks and Wilder.

“Gene Wilder, one of the truly great talents of our time, is gone,” Brooks wrote in a statement Monday. “He blessed every film we did together with his special magic and he blessed my life with his friendship. He will be so missed.”

With his unkempt hair and big, buggy eyes, Wilder was a master at playing panicked characters caught up in schemes that only a madman such as Brooks could devise, whether reviving a monster in “Young Frankenstein” or bilking Broadway in “The Producers.” Brooks would call him “God’s perfect prey, the victim in all of us.”

But he also knew how to keep it cool as the boozing gunslinger in “Blazing Saddles” or the charming candy man in the children’s favorite “Willy Wonka and the Chocolate Factory.” His craziest role: the therapist having an affair with a sheep in Woody Allen’s “Everything You Always Wanted to Know About Sex.”

“The greatest comedic mind of my childhood is now gone,” actor Josh Gad wrote on Twitter. “#RIP #GeneWilder & thank you 4 your pure imagination. This one hits hard.”

Tweeted Jim Carrey: “Gene Wilder was one of the funniest and sweetest energies ever to take a human form. If there’s a heaven he has a Golden Ticket.”

Wilder was close friends with Richard Pryor and their contrasting personas — Wilder uptight, Pryor loose — were ideal for comedy. They co-starred in four films: “Silver Streak,” ”Stir Crazy,” ”See No Evil, Hear No Evil” and “Another You.” And they created several memorable scenes, particularly when Pryor provided Wilder with directions on how to “act black” as they tried to avoid police in “Silver Streak.”

But Wilder would insist in a 2013 interview that he was no comedian. He told interviewer Robert Osborne it was the biggest misconception about him.

“What a comic, what a funny guy, all that stuff! And I’m not. I’m really not. Except in a comedy in films,” Wilder said. “But I make my wife laugh once or twice in the house, but nothing special. But when people see me in a movie and it’s funny then they stop and say things to me about ‘how funny you were.’ But I don’t think I’m that funny. I think I can be in the movies.”

In 1968, Wilder received an Oscar nomination for his work in Brooks’ “The Producers.” He played the introverted Leo Bloom, an accountant who discovers the liberating joys of greed and corruption as he and Max Bialystock (Zero Mostel) conceive a Broadway flop titled “Springtime For Hitler” and plan to flee with the money raised for the show’s production. Matthew Broderick played Wilder’s role in the 2001 Broadway stage revival of the show.

Though they collaborated on film, Wilder and Brooks met through the theater. Wilder was in a play with Brooks’ then-future wife, Anne Bancroft, who introduced the pair backstage in 1963.

Wilder, a Milwaukee native, was born Jerome Silberman on June 11, 1933. His father was a Russian emigre, his mother was of Polish descent. When he was 6, Wilder’s mother suffered a heart attack that left her a semi-invalid. He soon began improvising comedy skits to entertain her, the first indication of his future career.

He started taking acting classes at age 12 and continued performing and taking lessons through college. In 1961, Wilder became a member of Lee Strasberg’s prestigious Actor’s Studio in Manhattan.

That same year, he made both his off-Broadway and Broadway debuts. He won the Clarence Derwent Award, given to promising newcomers, for the Broadway work in Graham Greene’s comedy “The Complaisant Lover.”

He used his new name, Gene Wilder, for the off-Broadway and Broadway roles. He lifted the first name from the character Eugene Gant in Thomas Wolfe’s “Look Homeward, Angel,” while the last name was clipped from playwright Thornton Wilder. A key break came when he co-starred with Bancroft in Bertolt Brecht’s “Mother Courage,” and met Brooks, her future husband.

“I was having trouble with one little section of the play, and he gave me tips on how to act. He said, ‘That’s a song and dance. He’s proselytizing about communism. Just skip over it, sing and dance over it, and get on to the good stuff.’ And he was right,” Wilder later explained.

Before starring in “The Producers,” he had a small role as the hostage of gangsters in the 1967 classic “Bonnie and Clyde.” He peaked in the mid-1970s with the twin Brooks hits “Blazing Saddles” and “Young Frankenstein.”

He went on to write several screenplays and direct several films. In 1982, while making the generally forgettable “Hanky-Panky,” he fell in love with co-star Gilda Radner. They were married in 1984, and co-starred in two Wilder-penned films: “The Woman in Red” and “Haunted Honeymoon.”

After Radner died of ovarian cancer in 1989, Wilder spent much of his time promoting cancer research and opened a support facility for cancer patients. In 1991, he testified before Congress about the need for increased testing for cancer.

That same year, he appeared in his final film role, in “Another You” with Pryor.

Wilder worked mostly in television in recent years, including appearances on “Will & Grace” — including one that earned him an Emmy Award for outstanding guest actor — and a starring role in the short-lived sitcom “Something Wilder.” In 2015, he was among the voices in the animated “The Yo Gabba Gabba! Movie 2.”

As for why he stopped appearing on the big screen, Wilder said in 2013 he was turned off by the noise and foul language in modern movies.

“I didn’t want to do the kind of junk I was seeing,” he said in an interview. “I didn’t want to do 3D, for instance. I didn’t want to do ones where there’s just bombing and loud and swearing, so much swearing … can’t they just stop and talk instead of swearing?”

Wilder is survived by his wife, Karen, whom he married in 1991, and his daughter from a previous marriage, Katherine, from whom he was estranged.