Carl Reiner, a gifted comic improviser who created the enduring 1960s sitcom “The Dick Van Dyke Show” and Mel Brooks’s 2,000-Year-Old Man character — a cranky Jewish rascal who claimed to have dated Joan of Arc (“what a cutie”) and have 42,000 children (“and not one comes to visit me”) — died June 29 at his home in Beverly Hills. He was 98.

Actor and filmmaker Rob Reiner, one of his sons, confirmed the death in a tweet.

The elder Mr. Reiner gained a national following in the 1950s as a brilliant straight man opposite Sid Caesar on influential TV comedy programs, directed movies that launched Steve Martin’s film career in the 1970s and 1980s, and played an aging con man in the Ocean’s Eleven movie franchise of the 2000s starring George Clooney and Brad Pitt.

Mr. Reiner was masterful at following comic logic to its most ridiculous conclusion — especially when he collaborated with Brooks on ad-libbed comedy routines about the 2,000-Year-Old Man. The first of their five albums, released in 1960, influenced a generation of comedians, including Billy Crystal, Albert Brooks, Bill Cosby and Paul Reiser.

Mr. Reiner played the eager, probing questioner who tried to elicit pearls of wisdom any average listener would want to know from a man who was 2,000 years old, played by Brooks.

Reiner: Sir, what do you consider the greatest medical discovery in the 2,000 years that you’ve lived to be? Would it be the advent of transplants of organs, the use of antibiotics, the heart-lung machine?

None of the above, Brooks replied. It was liquid Prell shampoo, whose bottle was unbreakable. “A heart-lung machine is in your medicine cabinet and falls out — it’s going to break!”

Brooks once said of Mr. Reiner: “His genius was in getting this little Jewish rat in a corner and trapping him. He’d always say, ‘Prove it, prove it.’

“I’d come up with these fantastic statements . . . and he never let me up. He’d be demanding real proof for all my statements. Which was insane, since the first statement was I was 2,000 years old, and that wasn’t challenged.”

As Mr. Reiner told the Los Angeles Times: “I knew a man in panic was just hilarious. I knew that if he was against the wall, he’d always find gold.”

During the 1950s, Mr. Reiner and Brooks would perform the 2,000-Year-Old Man interviews only for friends at dinner parties. They were reluctant to record the routine.

In a 1999 New York Times interview, he recalled telling Brooks: “We can’t do it for anybody but Jews and non-anti-Semitic friends. The Eastern European Jewish accent Mel did was persona non grata in 1950. The war had been over for five years — the Jews had been maligned enough.”

Mr. Reiner and Brooks slowly built a following among the show-business elite — comedian George Burns threatened to steal the idea if they did not record it first.

The first Reiner-Brooks record, “2000 Years with Carl Reiner and Mel Brooks,” reportedly sold more than 1 million copies. In an era when a lot of Jewish comics and writers hid their ethnic identities, the album was among the first to help make Jewish humor mainstream, the comedy historian Gerald Nachman said in a 2013 interview for this obituary.

Mr. Reiner said the movie star Cary Grant once played it for the Queen Mother at Buckingham Palace, and she apparently “roared” with laughter.

Using a Yiddish expression for a non-Jewish woman, Mr. Reiner told Brooks: “Well, there’s the biggest shiksa in the world. We must be all right.”

'Your Show of Shows'

Carl Reiner was born March 20, 1922, in the Bronx to Jewish immigrants from Eastern Europe. His mother was from Romania, and his father was from what was the Austro-Hungarian Empire.

After completing high school at 16, he was working as a machinist’s helper in the millinery trade when he began taking drama classes sponsored by the federal Work Projects Administration.

Tall, lean and rubbery-faced, he was a physical comedian with a booming voice and a talent for foreign-accented gibberish. After serving in an Army entertainment unit during World War II, he appeared in Broadway musicals before joining the cast of the Caesar comedy program “Your Show of Shows” in 1950.

“We really needed a second banana, somebody who could dive in and out of Sid and support him,” Brooks once said. “Nobody could do foreign gibberish better than Sid Caesar, but this Reiner guy could keep up with him.”

“Your Show of Shows” (1950-1954) and its successor, “Caesar’s Hour” (1954-1957), were live programs on NBC that drew tens of millions of viewers every week with their blend of slapstick comedy and sophisticated farce. They set the standard for later programs such as “The Carol Burnett Show” and “Saturday Night Live.”

The Caesar shows featured some of the most inventive comedy writers ever assembled, including Brooks (who went on to direct “The Producers” and “Young Frankenstein”), Mel Tolkin (later a writer for “All in the Family”), Larry Gelbart (a creator of the TV series “M.A.S.H.”) and Neil Simon (who immortalized the writers’ room in his play “Laughter on the 23rd Floor” and also wrote, among many other plays and movies, “The Odd Couple.”)

Along with Imogene Coca and Howard Morris, Mr. Reiner was a critical supporting player in Caesar’s parodies of foreign films (“U-bet-u,” a sendup of samurai movies), contemporary game shows (“Break Your Brains”) and tragic opera (“Gallipacci,” whose score opens with a rousing aria set to “Santa Claus Is Coming to Town.”)

Creatively speaking, the 2,000-Year-Old Man was born in 1950, after Mr. Reiner came to work one day after seeing a program called “We the People Speak,” in which actors impersonate newsmakers.

“They were interviewing this guy on TV, who was saying, ‘I was in Stalin’s toilet and I overheard their plans — they’re going to blow up the world next Tuesday.’ I couldn’t believe I had heard something on TV so stupid,” he told the Los Angeles Times in 1994. “So I went into the writers’ room and said to Mel, ‘Isn’t it true you were there when Christ was crucified?’ I didn’t even expect an answer, but Mel just took off.”

Mr. Reiner: You knew Jesus?

Brooks: Yes, yes. Thin lad, wore sandals. . . . Always walked around with 12 other guys. . . . They used to come into the store a lot. Never bought anything.

Creating a TV classic

After “Caesar’s Hour” ended its run, Mr. Reiner was dissatisfied with the TV offers that came his way. So he created a sitcom, called “Head of the Family,” based on his life as a variety-show writer who lives in the New York suburbs.

The pilot, starring Mr. Reiner and Barbara Britton as his wife, flopped. But actor and veteran TV producer Sheldon Leonard rescued the concept from the trash bin.

“I knew he was talented,” Leonard once said of Mr. Reiner, “so I wondered why it hadn’t sold. He had been miscast. He didn’t look or sound like a Scarsdale [commuter]. . . . His willingness to step aside and let someone else carry the ball was the reason for the existence of ‘The Dick Van Dyke Show.’ ”

Van Dyke, a rising Broadway actor, was his replacement, and little-known actress Mary Tyler Moore played his wife.

Mr. Reiner cast himself as the megalomaniacal TV host, Alan Brady, whose toupee became a running gag.

Mr. Reiner shared five Emmy Awards for writing and producing the sitcom, which aired on CBS from 1961 to 1966 and has been in near-constant syndication ever since.

It was one of the first shows about the process of writing for television, an exotic world for most viewers at the time, and it showed a far more playful, believable married couple than earlier sitcoms, Nachman said.

Van Dyke’s character also had a self-doubting vulnerability that was rare in an era of two-dimensional sitcom dads. Nachman called the show a transition between “goody-two-shoes sitcoms” of the 1950s and grittier fare such as “All in the Family” in the 1970s.

Mr. Reiner went on to focus on a movie career. He had a leading role in the Cold War film comedy “The Russians Are Coming, the Russians Are Coming” (1966) with Jonathan Winters. He later became a commercially successful director with “Oh, God!” (1977), starring George Burns, and early Steve Martin comedies, including “The Jerk” (1979) and the film-noir sendup “Dead Men Don’t Wear Plaid” (1982).

In 1967, Mr. Reiner directed “Enter Laughing,” based on his earlier, semi-autobiographical novel. His other directing credits included “Where’s Poppa?” (1970), based on Robert Klane's darkly comic novel, and the tepid comedies “Summer Rental” (1985) starring John Candy and the Armand Assante vehicle “Fatal Instinct” (1993), a parody of sexy thrillers.

Mr. Reiner had frequent guest roles on TV shows and won another Emmy, in 1995, when he revived the Brady character on the NBC sitcom “Mad About You.” He also was a poker buddy of Johnny Carson’s and made 47 appearances on “The Tonight Show.”

In his screen work, Mr. Reiner was perhaps overshadowed by his wife, the former Estelle Lebost, who spoke one of the best-remembered movie lines of all time.

His son Rob cast her in “When Harry Met Sally” (1989) as the deli patron who watches Meg Ryan fake a very public orgasm and then tells a waitress, “I’ll have what she’s having.”

Estelle Reiner died in 2008. They had been married nearly 65 years. In addition to Rob Reiner, survivors include two other children, Annie and Lucas; and five grandchildren.

In 1999, Mr. Reiner was inducted into the Academy of Television Arts and Sciences’ Hall of Fame. The next year, he received the Kennedy Center’s Mark Twain Prize for American Humor.

He also shared with Brooks the 1998 Grammy Award for best spoken comedy album for their final release featuring the 2,000-Year-Old Man.

Mr. Reiner appeared in the HBO documentary “If You’re Not in the Obit, Eat Breakfast” (2017), about very senior citizens who remain active.

He had embraced Twitter in recent years and focused on using the medium to share political and cultural commentary; in the days before his death, he appeared in a Black Lives Matter shirt.

Crystal wrote in the foreword to Mr. Reiner’s 2013 memoir, “I Remember Me”: “I’ve always looked at his career as one of the best ever and one of the most important. . . . He didn’t have to be a star. Always willing to be second if it helped the team finish first, Carl has never had an air about him. He is what he is: a nice genius.”

CORRECTION: An earlier version of this story incorrectly reported that both of Mr. Reiner’s parents were from Romania. His mother was Romanian, and his father was from what was the Austro-Hungarian Empire. The story has been revised.