Republican presidential nominee Donald Trump appears on “The Tonight Show Starring Jimmy Fallon.” (Andrew Lipovsky/NBCUniversal Media via Reuters )

In 1960, John F. Kennedy made history by being the first presidential candidate to appear on a late-night television program. His opponent, Richard Nixon, would soon follow suit.

In a segment on “Tonight Starring Jack Paar,” the precursor to “The Tonight Show,” Kennedy was composed and cool. Most notably, he was generally serious, offering his opinion on communism: “The United States is really the only guardian at the gate against the communist advance.”

Only at one point did he make a joke, and it fell flat (it came when Paar asked for an amusing campaign anecdote, and Kennedy responded, “I was made an honorary Indian”).

At the time, the appearances of Kennedy and Nixon (whose appearance was equally serious) were cause for debate.

As Frank Rich wrote in the New York Times, “By the standards of 1960, a presidential candidate’s appearance on an entertainment program was considered a bit shocking.”

“Most depressing of all,” New York Times columnist Emmet John Hughes wrote in 1960, television “introduces [political candidates] to the intellectual companionship of Jack Paar, with or without Zsa Zsa. What manner of farce is this? Sideshow-for-free — for a free people — or dress rehearsal for national tragedy?”

Among the most heated critics of a candidate visiting a comedian’s show was the New York Times columnist James Reston, who, tongue pressed firmly in his cheek, wrote that this adds a second criterion for voters to consider: In addition to standing up to Russia’s communist premier Nikita Khrushchev, the candidate would have to handle Paar.

“From now on,” Reston wrote, “it will be important to analyze not only who has the best speech writers but who has the best gag-writers.” He called the appearances part of “the rigged political show” and claimed that it was “the greatest development since the stuffed ballot box.”

He concluded, “The historians and the philosophers of the country would like to question them both on serious matters, but the comedians have priority. Just who gains from all this and why these two deadly serious and tense young men want to prove that they are funny and relaxed is not quite clear. It is a precedent, all right, and anyone who wonders why is obviously a stuffed shirt.”

Reston was right about one thing: It set a precedent.

Just last week, Jimmy Fallon, the host of NBC’s flagship late-night comedy show, tussled Republican presidential nominee Donald Trump’s hair and handed literal softballs to Democratic nominee Hillary Clinton.

Appearing on late-night television has become an almost necessary part of the campaign, one that is still met with pushback and rhetoric about the diminishing intellectual capacity of Americans and the supposed damage these appearances do to the office of the president.

But, Reston may have been onto something else: Slowly over time, the appearances seemed sillier and sillier, more about antics than policy, and has now become the norm.

The first candidate to move in the direction of comedy and camp was, surprising as it may sound, Nixon.

After losing the California gubernatorial race, Nixon was invited to appear on Paar’s new show, “The Jack Paar Program” in 1963. (Its format was essentially the same as his late-night show, only it aired in prime time.) Perhaps because he wasn’t actively running for office at the time, Nixon was “in an uncharacteristically relaxed and convivial mood,” according to The Washington Post.

He even played an original composition on the piano.

Nixon took things a step further in 1968, the year he won the presidency.

In what The Post’s Tom Shales called the “climax” of the “restylization of the Nixon image,” the presidential candidate appeared briefly on “Rowan & Martin’s Laugh-In,” a manic, strange, innuendo-laden NBC sketch comedy program that aired on Monday nights (and, fun fact, was where Lorne Michaels got his start as a writer).

One of its recurring segments involved characters uttering a variation of the phrase “Sock it to me,” immediately followed by bad things happening to them — dresses were comically torn off, actors were cartoonishly hit on the head with clubs, buckets of water were tossed on the unsuspecting mutterers.

At the end of one long sequence of “Sock it to me”isms, one Richard Nixon, Republican nominee for president of the United States, appeared for a five-second cameo, in which he (confusingly) spoke that very phrase — arguably the first truly goofy and surreal moment for a candidate on a comedy show.

In The Post, Shales called the clip “probably the most important five-second appearance in the history of political television.” In 2008, Richard Sandomir wrote in the Times that the line was responsible for “flinging open the door for candidates to troll for votes in nontraditional ways.”

In other words, as The Post noted in 2014, “Nixon established an important precedent by utilizing a comic setting for a serious purpose: connecting with voters.”

Those five seconds also caused controversy.

As written in the Times later that year, “The sight of a major candidate for the nation’s highest and presumably most dignified office indulging in such foolishness before an audience estimated at 40 million undoubtedly came as a shock and a scandal to many.”

When the show’s co-host Dick Martin helped conceive of the cameo, even NBC, which aired it, asked, “But what if he becomes president?”

“They were scared to death,” Martin told the Times in 1968.

Perhaps it was that very fear that kept other candidates from using comedy shows as a campaign platform for the next several years. As Newsweek noted, candidates mostly avoided the shows during the Jimmy Carter and Ronald Reagan years.

Reagan, a seasoned actor, appeared on “The Tonight Show With Johnny Carson” after not winning the Republication nomination in 1976, but the appearance — see it here — was stoic, mirroring that of Kennedy in 1960.

Then, with one appearance, the floodgates burst open.

In what The Post called a “cultural touchstone of the early 1990s,” Democratic presidential nominee Bill Clinton donned sunglasses and played “Heartbreak Hotel” on the tenor saxophone on “The Arsenio Hall Show.”

As excited as the show’s live studio audience sounded, not everyone was.

The Post called it a “lesson in how to electioneer in the brave new world of American politics” but, as the paper later noted, “many initially dismissed it as un-presidential.”

Barbara Walters called the moment “undignified.” Columnist George Will said it “coarsened” the political process.

“I thought it was embarrassing,” Torie Clarke, press secretary for George H.W. Bush’s presidential campaign, told The Washington Post. “He looked like a sad John Belushi wannabe. … I don’t think most Americans want to see their president wearing a goofy tie and sunglasses and blowing on a saxophone, and then talking about smoking pot with a late-night TV host.”

Regardless of people’s feelings about the moment, it’s difficult to deny that it worked.

“That TV appearance, coupled with a similar one two weeks later of Clinton in a town hall meeting on MTV, coincided with a turning point in the polls: Clinton started going up, while independent Ross Perot started going down,” wrote David Zurawik of the Baltimore Sun.

From that point on, almost every candidate has tried his or her hand at music or comedy on late-night talk shows, “Saturday Night Live” and everything in between as a means to connect with wider audience (and earn their votes).

As Frank Rich wrote in the Times, “Would-be presidents have no choice but to get with the program. For all the lip-service paid to authenticity, many voters have come to prefer a show to the naked truth.”

From George W. Bush poking fun at himself while reading a top 10 list on “Late Night With David Letterman” to Sarah Palin rapping on “Saturday Night Live” to John F. Kerry appearing on a motorcycle, wearing a leather jacket, on “The Tonight Show With Jay Leno” — it’s all part of a modern presidential campaign.

As were the recent “The Tonight Show with Jimmy Fallon” appearances by Hillary Clinton and Trump. (Along with the criticism that followed.)

For all that, only one man has ever appeared on such a show while serving as president. In 2009, President Obama became the first sitting president to appear on a late-night talk show, “The Tonight Show With Jay Leno.”

He has since appeared on a variety of ever eclectic shows — from the stoner comedy short “Between Two Ferns” to the confessional “WTF with Marc Maron” — leaving The Post to ask, “Will the United States ever again have a president who drops the mic or a first lady who raps about going to college?”

We’ll find out in November.

More from Morning Mix