Last night’s Friars dinner for legendary comics Freddy Roman and Stewie Stone made history.

Nasal comedian Gilbert Gottfried told a joke “so dirty and disgusting” — according to sources– that legendary comic Shecky Greene up and left. He left not only the Pierre Hotel ballroom, but possibly the Friars Club as well. Joy Behar, who was in the audience, was asked to sub for him. “And she did a great job,” my source said.

I’m waiting now for Shecky to check in.

But sources say Greene on deck after Gottfried finished up. Gottfried, relieved of his duties as the voice of the AFLAC duck after another controversy, couldn’t resist. Apparently the joke he told was much much worse than the “Aristocrats,” a joke so filthy that a whole documentary was made about it.

I can’t really reprint the joke here. It has to do with hemorrhoids. And something else.

“People were throwing up, especially the older people,” says my source.

Greene, in his late 80s, was horrified. He’s so mad that he left the hotel and vowed to quit the Friars. Today he missed eating lunch with another legend, Larry Storch, 91, and former star of “F Troop.”

Storch was consoled by pals Stewie Stone, and the great Norm Crosby, who were already lunching at the Friars.

Other comic greats at the dinner included Robert Klein, Dick Capri and Lainie Kazan. Sopranos star Dominic Chianese and singer Tony Orlando also attended.