A glass of whisky in his hand, Norman Mailer cursed the roaring crowd in Greenwich Village and told them to shut up when they interrupted his speech, a rollicking cascade of F-bombs and insults from start to finish.

“You’re nothing but a bunch of spoiled pigs!” Mailer shouted on that May night in 1969.

His outburst could have been dismissed as another case of Mailer being Mailer, a boozy, pugilistic genre that, when added up, included incidents such as when he stabbed his second wife with a pen knife and head-butted Gore Vidal backstage at the Dick Cavett show.

But on this night at the Village Gate a half century ago, Mailer was a candidate for mayor of New York, which meant that his drunken tirade was newsworthy, not to mention appalling to his supporters, including his ticket-mate, newspaper columnist Jimmy Breslin.

“I found out I was running with Ezra Pound,” Breslin, a candidate for city council president, later told a friend, a remark intended not as an assessment of Mailer’s poetic talent but of his sanity.

The Mailer-Breslin ticket of 1969 was a fanciful farce in a year defined by the preposterous-turned-true, whether it was men reaching the moon, or 400,000 hippies communing on a Woodstock farm, or the serially pathetic New York Mets somehow winning the World Series.

After the despair of 1968, an abyss defined by political assassinations and catastrophic riots, who could resist a Pulitzer Prize winning mayoral candidate with the campaign slogan, “No More Bull----”?

And who could reject a campaign that promised a ban on private cars in Manhattan, an annual World Series of stickball, and New York City’s anointment as the nation’s 51st state?

A lot of people, as it turned out.

Yet the Mailer-Breslin campaign of ‘69, with its histrionic duo and their rapid-fire one liners, was an antidepressant for a city battered by teacher and sanitation worker strikes, a monstrous blizzard, and enough muggings and murders to make Levittown seem like the promised land.

“New York was going down the toilet,” said Doug Muzzio, a Baruch College professor who was a schoolteacher at the time. “And here was this incongruous pairing — Mailer the big thinker, and Breslin the columnist. It was entertaining as well as liberating. But the question was whether they were really serious.”

Breslin was serious about blaming the political establishment — “the bums,” as he called them — for ruining the city. He was also serious about promoting his novels, one of which, “The Gang that Couldn’t Shoot Straight” — a hilarious sendup of the mob — was published that year.

But serve as city council president?

“Jimmy, when asked what he would do if he won, said, ‘I’d demand a recount,’ ” said Gloria Steinem, the feminist and author who was among the campaign’s organizers.

And what drove Mailer?

“Ego, ego and more ego,” Steinem said.

Mailer had toyed with running for mayor in 1960, the year he stabbed his wife in a drunken fury after she had purportedly questioned his manhood. Five years later, he watched another famous author, conservative William F. Buckley Jr., lose the mayor’s race to John V. Lindsay, the photogenic Republican. Vidal, who would provoke Mailer’s enmity with a vicious review of one of his books, had run for Congress.

“These were Norman’s major competitors and he was nothing if not competitive,” said Peter Manso, Mailer’s biographer who wrote position papers for the campaign. “He was attached to how history would see him and this would be an entry in the Norman Mailer history books.”

The Mailer for Mayor campaign was the brainchild of Steinem, Village Voice columnist Jack Newfield and conservative writer Noel Parmentel, who saw him as a vehicle for introducing new ideas to New York’s political discourse.

But Mailer, a Harvard man who lived in a Brooklyn Heights brownstone with sweeping views of Manhattan’s glitter, needed a partner with street cred. At Steinem’s urging, he joined up with Breslin, the voice of the blue-collar outer-boroughs whose writings were populated by only-in-New York characters such as Fat Thomas (a bookmaker) and Marvin the Torch (an arsonist).

If nothing else, the prospect of a Mailer-Breslin campaign was an excuse for coctail-infused soirees for the city’s intelligencia, drawing activists such as Flo Kennedy and Jerry Rubin, as well as writers like Peter Maas, Gay Talese, and Pete Hamill. Mary Hemingway — Ernest’s widow — showed up at a fundraiser, don’t you know.

A “hip coalition of the left and right,” Mailer told an early gathering as he encapsulated his vision for the campaign, a notion that caused “all hell to break loose” and “reverberated around the room like a fancy billiard shot,” as Joe Flaherty, his campaign manager, later wrote.

“I remember walking out a little early because I thought I would burst out laughing,” recalled one attendee, Jeremy Larner, a Eugene McCarthy speechwriter who would later write the screenplay for Robert Redford’s “The Candidate.” “I thought it was based on the excitement of celebrity rather than real political commitment. It just seemed like a lot of nonsense. And I remember saying to Mailer, ‘These guys are taking advantage of you.’ But Mailer was totally into it and serious about it.”

Standing before no less than 14 microphones, Mailer announced their campaign on May 1, six weeks before the Democratic primary, stressing as their central platform that the city needed to secede from New York State to empower its neighborhoods.

Breslin, who showed up 50 minutes late because he was stuck in traffic, dismissed concerns that “entering politics will damage my credibility as a writer.”

“Perhaps,” he said. “It didn’t hurt Winston Churchill.”

His running mate sought to make a virtue of the ticket’s literary talent.

“If I’m elected,” Mailer said, “at least the bad news will be couched in elegant language.”

Their Democratic opponents — a cluster that included Comptroller Mario Procaccino, former mayor Robert F. Wagner Jr. and Bronx Borough President Herman Badillo — did not exude anything resembling concern.

“He’s a buffoon,” said Procaccino, a law and order candidate, erupting in laughter when asked about Mailer.

Yet Mailer and Breslin insisted they were serious. They rolled out a litany of promises, including free bikes in city parks, requiring cops to live in neighborhoods they patrolled, and building a monorail around Manhattan (the “Mailer Rail”), a proposal that inspired then-congressman and future mayor Ed Koch, to read it into the congressional record.

On May 5, four days after their announcement, Mailer became the one and only candidate in the race who could boast of a Pulitzer Prize, which he won for “Armies of the Night,” his nonfiction account of the antiwar movement. He promised to contribute his $1,000 prize money to the campaign.

Five days later, he took the stage at the Village Gate, whisky in hand.

It was 1 a.m.

“I’m running on a platform of Free Huey Newton and end fluoridation,” he said before endorsing the notion of “compulsory free love in neighborhoods which vote for it, and compulsory church attendance on Sunday for those neighborhoods who vote for that.”

When someone in the audience asked him to talk about the 51st state, Mailer replied, “Shut up. You’re not my friend if you interrupt me ‘cause it just breaks into the mood in my mind.”

Then came another f-bomb.

As Mailer finished, Breslin bee-lined for the exit. Manso and Flaherty retired to a nearby bar to ponder how their candidate “out of insecurity, madness, and a lack of discipline, got himself so drunk he called his voters scum.”

On June 17, primary day, the electorate returned the favor.

Mailer received 41,000 votes, losing badly to Procaccino, whom Lindsay defeated in the general election to win a second term. Breslin received 66,000 votes and came in fifth.

As they conceded, Breslin said he was “mortified” that he had participated in a civic exercise that required that all bars be closed. Mailer, as it happened, confessed to New York magazine years later that he actually thought he would win.

“For me, it was a religious venture,” the author said. “I thought God had chosen me because I had been a bad man. And I was going to pay for my sins by winning and never having an easy moment ever again.”

Read more Retropolis: