Democratic presidential candidate Bernie Sanders speaks at a rally in Exeter, N.H., last week. (Photo by Charles Ommanney/The Washington Post)

Democratic presidential hopeful Bernie Sanders appeared on “Saturday Night Live” with Larry David — his fellow cranky Brooklynite who’s portrayed the senator in multiple sketches this season — but in a rather unexpected way.

David was playing a passenger on a sinking Titanic-like ship when Sanders emerged to protest his insistence that he get a spot on a lifeboat because he comes from a wealthy family.

“Hold on, hold on, wait a second,” the Sanders character said. “I am so sick of the 1 percent getting this preferential treatment. Enough is enough. We need to unite and work together if we’re all going to get through this.”

“Sounds like socialism to me,” the David character said.

“Democratic socialism,” Sanders said, correcting him..

“Ahhh, what’s the difference?” asked David.

“Huuuuge difference,” Sanders said, stretching out the word “huge” even longer than he does on the campaign trail.

“Huge?” asked David.

“Huuuuuuuge,” Sanders responded.

“Who are are you?” David asked.

“I am Bernie Sanderswitsky,” Sanders replied. “But we’re gonna change it when we get to America so it doesn’t sound quite quite so Jewish.”

“Yeah, that’ll trick ‘em,” said the David character.

After a commercial break, Sanders re-appeared, out of costume, to help David introduce the show’s musical guest, The 1975.

“How are things going in New Hampshire?” David asked him.

“Pretty, pretty, pretty, pretty good,” Sanders responded, mimicking the comedian who has played the Vermont senator with uncanny precision this season.

Sanders’s appearance on the long-running NBC comedy show in New York briefly took him off the campaign trail in New Hampshire, where recent polls have shown him with a double-digit lead over rival Hillary Clinton.

Sanders is due back in the nation’s first primary state Sunday to resume campaigning in advance of Tuesday’s contest. From there, he will need to quickly build his national exposure for a series of other primaries and caucuses in coming weeks.

Earlier in the show Saturday, David reprised his role as Sanders in a pre-recorded sketch — modeled upon David’s show “Curb Your Enthusiasm” — that sought to explain the Vermont senator’s loss to Clinton in the Iowa caucuses by a margin of 49.8 percent to 49.6 percent.

A very cantankerous David-as-Sanders was shown refusing to shake the hand of woman at a rally who had sneezed on it moments before, complaining, “I’m running for president. I do not shake germ-infested hands.”

Later, the Sanders character left his campaign office in search of an acceptable cup of coffee and encountered a woman in a car accident. He refused to help when she asked him to pop her shoulder back in place.

As Sanders and his staff later watched a broadcast of the caucus results, both women were among those who had joined Clinton at her victory celebration.

Democratic presidential candidate Bernie Sanders appeared on NBC's "Saturday Night Live" on Feb. 6. Why are politicians so eager to be on a show that will undoubtedly make fun of them? The Post's Elahe Izadi digs into why shows like "SNL" are key to political success. (Nicki DeMarco/The Washington Post)

Clinton appeared on “SNL” in October, in a sketch in which she played a bartender who commiserated with Clinton as played by the show’s cast member Kate McKinnon.

Republican candidate Donald Trump has also appeared on “SNL” this season.

Prior to the broadcast, Sanders’s campaign revamped its Web site to include a fundraising pitch that showed a photo of David playing Sanders in a previous “SNL” sketch in which the fictitious candidate urged people to donate pennies found in their vacuum cleaners to his campaign.

“Contribute your vacuum pennies!” the Sanders Web site said. “The other candidates are taking millions of dollars from folks like the Koch Brothers and ExxonMobil. Our campaign is different.”