Chuck Barris, the man behind TV’s “The Dating Game,” “The Gong Show” and other game shows, pictured in December 2002 (Bebeto Matthews/AP)

Chuck Barris, the creator of television’s long-running “The Dating Game” and “The Newlywed Game” who later hosted the offbeat cult classic “The Gong Show” — and who claimed in a memoir to have been a CIA assassin — died March 21 at his home in Palisades, N.Y. He was 87.

A spokesman, Paul Shefrin, announced the death, but the cause was not disclosed. Mr. Barris had surgery for lung cancer in 2000.

In a career with few parallels in show business, Mr. Barris also wrote a Top 5 pop song, a best-selling novel and was credited — or blamed — for launching a spate of raunchy reality shows that grew out of his creations in the 1960s and 1970s.

He held several jobs in television early in his career. One involved monitoring “American Bandstand” host Dick Clarkto make sure he was not taking payola from record companies. He moved to Los Angeles in the early 1960s to be in charge of daytime programming for ABC-TV.

He wrote a song, “Palisades Park,” that reached No. 3 on the Billboard pop charts in 1962 for singer Freddy “Boom Boom” Cannon. Within a few years, Mr. Barris was out of work and had run through his record royalties.

Chuck Barris, right, in 1980 with his wife at the time, Robin Altman. (Sands/AP)

Borrowing money from his family, he formed a production company that introduced a game show in which a young “bachelorette” questioned three young men hidden behind a wall. She then selected one of the men to accompany her on a date. (Occasionally, a man asked questions of three women.)

When “The Dating Game” premiered on ABC in December 1965 (“from Hollywood, the dating capital of the world”), critics called it a new low in television. It was considered crass, demeaning and sexually suggestive — which it was, by design. The show became a hit.

After some responses in the show’s early tapings became too explicit run on the air, Mr. Barris hired a tough-looking actor to stand just offstage. Contestants were told that it was an FBI agent who was there to arrest anyone who cursed or said anything salacious.

In 1966, Mr. Barris launched a second show, “The Newlywed Game,” with four recently married couples who answered comical and intimate questions about their partners. Because the word “sex” could not be used on television at the time, host Bob Eubanks often asked questions about “making whoopee,” which led to giggles, embarrassing comments and millions of viewers.

“These shows were the equivalent of finding dirty magazines under your parents’ mattress,” television historian Robert Thompson told the Sacramento Bee in 2003. “They had a leering quality to them and really stood out. They were extraordinary at a time when the other shows in the Top 10 were ‘Gomer Pyle’ and ‘Mayberry R.F.D.’ ”

Both of Mr. Barris’s shows ran until the mid-1970s, with daytime and prime-time versions, and Mr. Barris produced several other show during the same time, including “The Parent Game,” “How’s Your Mother-in-Law?,” “The New Treasure Hunt” and “The Game Game.”

Mr. Barris, who liked to read classic literature and paint in his spare time, was under no illusion about what he had created for television.

Chuck Barris in 2002. (Bebeto Matthews/AP)

“It’s the bargain basement of the arts,” he told TV Guide in 1975. “Daytime TV does not make meaningful statements. You begin and end with the banal.”

In 1976, he dug an even deeper basement with “The Gong Show,” which was meant to be a parody of TV talent shows. The first host was fired because he didn’t get the joke, forcing Mr. Barris to take over as the goofy master of ceremonies, wearing bizarre headgear as he barely controlled a wild carnival of blue humor and sheer bad taste.

“I was a crazy man when they turned the camera on,” he told the Chicago Sun-Times in 2003.

A few performers, such as country singer Boxcar Willie, launched careers on “The Gong Show,” but most were unceremoniously ushered offstage at the sound of a gong. Winners received a prize of $516.32.

Besides Mr. Barris’s manic hosting style, the show was known for the awkward gyrations of Gene Gene the Dancing Machine and the groan-inducing jokes of the Unknown Comic, who wore a paper bag over his head.

The show reached its nadir with the appearance of an act generally remembered as “The Popsicle Twins” but officially called “Have You Got a Nickel?” Two barefoot teenage girls sat down on stage and proceeded to lick pink Popsicles.

Two celebrity judges, Phyllis Diller and Jamie Farr, gave them low marks, but the third, singer-actress Jaye P. Morgan, gave the girls a top score of 10, saying, “Do you know that’s the way I started?”

“The Gong Show” became a huge hit in the late 1970s, especially among young people. Others were appalled. Mike Wallace interviewed Mr. Barris on “60 Minutes,” asking how he could bring people on television only to embarrass them.

“The contestants on our shows come because they have a good time,” Mr. Barris replied. “These people don’t take participating on a game show as seriously as you think they do, Mike. It’s not a big sociological thing. They just want to have some fun.”

Charles Hirsch Barris was born June 3, 1929, in Philadelphia. His father, a dentist, died when his son was young.

After attending several colleges, Mr. Barris graduated in 1953 from Philadelphia’s Drexel University. He was a steelworker and salesman before joining NBC as a page.

Later, as a producer, Mr. Barris filled 27 hours of programming a week at the peak of his career. “The Gong Show” was canceled in 1980, and a film version that year was a flop. Mr. Barris sold his production company for a reported $100 million and moved to France.

Six years earlier, he had written a best-selling autobiographical novel, “You and Me, Babe,” about the failing marriage of a television executive. In 1984, he published a book purporting to be a memoir, “Confessions of a Dangerous Mind,” in which he made the claim that while he was producing game shows, he was secretly working as an international assassin for the CIA.

The book received little attention at the time, but it attracted a cult following and was made into a feature film in 2002, with actor Sam Rockwell portraying Mr. Barris. “Confessions of a Dangerous Mind” marked the directing debut of George Clooney, who played Mr. Barris’s CIA minder.

When asked if Mr. Barris ever worked for the CIA, agency spokesman Tom Crispell told the Los Angeles Times, “It sounds like he has been standing too close to the gong all those years. Chuck Barris has never been employed by the CIA and the allegation that he was a hired assassin is absurd.”

Mr. Barris’s marriages to Lyn Levy and Robin Altman ended in divorce. Survivors include his wife, Mary Kane, whom he married in 2000.

His only child, Della Barris, from his first marriage, often introduced her father on “The Gong Show.” She died of a drug overdose in 1998. Mr. Barris published a memoir about her in 2010.

He wrote several other books, including a memoir in which he said nothing about the CIA and a follow-up to “Dangerous Mind,” in which he claimed further clandestine exploits. But he knew what his lasting legacy would be.

“I’m the guy who came up with spontaneous TV,” he said in 2003. “It has evolved into ‘American Idol,’ ‘Survivor’ and even ‘Jerry Springer.’ My shows were stolen all over the place. ‘Love Connection’ was ‘Dating Game.’ ‘American Idol’ is part ‘Gong Show.’ I guess this is what they call a tribute.”