Michael Richards, who played Jerry Seinfeld’s goofy neighbor Kramer on “Seinfeld,” exploded in a bizarre, racist rant during a stand-up comedy routine, hurling slurs at two black men in the audience before storming off the stage, it was revealed yesterday.

“Fifty years ago, we’d have you upside down with a f- – -ing fork up your ass,” Richards, 57, screamed at the two, who had been heckling the comic at Los Angeles’ Laugh Factory comedy club Friday night.

One of the men yelled back at Richards that his offensive comments were “f- – -ing uncalled for.”

Richards’ friends, including Seinfeld, were stunned when they heard about what happened.

“I am sick over this,” Seinfeld said. “I’m sure Michael is also sick over this horrible, horrible mistake. It’s so extremely offensive. I feel terrible for all the people who have been hurt.”

Richards apologized last night during a rambling appearance, via satellite, on David Letterman’s “Late Show.” Calling his behavior “inexcusable,” Richards looked uncomfortable and insisted that he was not a racist.

He said he had been “overcome with rage” when the hecklers wouldn’t stop, adding he wished he could have apologized individually to each member of the club’s audience.

The appearance was arranged by Seinfeld, who was a guest on the show.

Kenny Kramer – the eccentric New Yorker on whom Richard’s character, Cosmo Kramer, was based – attributed Richard’s meltdown to the actor’s inexperience as a road comic and trouble handling hecklers.

“Michael is no racist,” Kramer said. “He just got frustrated with situation and had a tantrum.”

Kramer said Richards is not at all like his wacky alter-ego and that probably made the situation worse.

While there is some chuckling in the audience at the onset of the outburst, someone can be heard gasping, “Oh, my God!” and people respond with “ooh” after Richards uses the racist epithet.

Eventually, someone calls out: “It’s not funny. That’s why you’re a reject, never had no shows, never had no movies. ‘Seinfeld,’ that’s it.”

Representatives for Richards did not return calls.

Comedian Paul Rodriguez, who was performing at the club when Richards had his meltdown, said he was shocked.

“Once the word comes out of your mouth and you don’t happen to be African-American, then you have a whole lot of explaining,” Rodriguez told CNN. “Freedom of speech has its limitations, and I think Michael Richards found those limitations.”

At a news conference yesterday, “Laugh Factory” owner Jamie Masada expressed remorse and said Richards will not be back until he says he’s sorry.

“This is one thing we don’t tolerate . . . I personally apologize. I apologize from my heart,” Masada said.

Richards did appear at the club the next day without incident, but that was because he had told the club he intended to apologize, according to a Laugh Factory statement issued yesterday.

Rodriguez, also at the news conference, said, “I kept expecting a punch line [Friday]. It didn’t come.”