Less than half an hour after Herman Cain announced that he was suspending his campaign for the GOP presidential nomination amid allegations of sexual harassment and a 13-year affair, the man who potentially stands to gain the most from the exit of the former Godfather’s Pizza CEO heaped praise on his former rival.

At a town hall and book-signing event organized by the Staten Island Tea Party, former House speaker Newt Gingrich (R) told about 600 supporters here that “this has been a very difficult time” for Cain and his family.

“We’re delighted to have him as a friend. ... All of us wish him well,” Gingrich said.

He praised Cain for talking about “big” ideas such as his “9-9-9” tax plan and said he “really appreciated” what Cain brought to the presidential race.

“I think he deserves credit for having the courage to talk about big ideas and focus on the economy,” Gingrich said of Cain.

Cain’s decision to suspend his campaign, announced Saturday afternoon at a highly-anticipated event in Atlanta, could not have come at a better time for Gingrich.

The former House speaker, who was accompanied at the event by his wife, Callista, has been surging in recent weeks due to a series of strong debate performances and amid campaign-trail stumbles by his rivals in the race to secure the support of those opposed to the current primary frontrunner, former Massachusetts governor Mitt Romney (R).

And five weeks out from the first primary nominating contests, Gingrich’s recent surge was given a further boost last week by an endorsement from the New Hampshire Union Leader.

Gingrich’s Staten Island event came on the heels of a brief stop in Iowa and a three-day tour of South Carolina, the early state that since 1980 has been won by every Republican contender who has gone on to secure the GOP nomination.

After briefly praising Cain, Gingrich devoted the bulk of the rest of his remarks at the event to critiquing President Obama, to whom he re-issued his challenge to “seven three-hour Lincoln-Douglas debates.”

“If he wants a teleprompter, he gets a teleprompter,” Gingrich said to laughs from the audience. “If you had to defend Obamacare, wouldn’t you want a teleprompter?”

The event was interrupted several times by a handful of protesters from the Occupy movement, one of whom stood up and yelled, “Mic check!” as Gingrich was speaking.

“Get a job!” one man shouted back as the crowd booed the protester out of the hall. Gingrich stood calmly at the podium during the fracas, then quipped that the protester was likely an Obama supporter before continuing with his critique of the president.

In response to a query from a supporter during a brief question-and-answer session at the event, Gingrich urged Republicans to oppose any candidate who might seek to run under a third-party banner, as some have speculated Rep. Ron Paul (R) or former Utah governor Jon Huntsman (R) might choose to do.

“Any third-party candidate is only an assistance to Obama,” Gingrich said. “There should be no third-party candidates.”

In response to another question, Gingrich offered praise for former president Bill Clinton, who Gingrich said was adept at doing the “little things” to reach out to lawmakers from across the aisle, such as “having people on Air Force One.”

(Not mentioned by Gingrich: the now-infamous Air Force One episode in which the former speaker complained of being relegated to the rear of the plane, with no face time with Clinton.)

Afterward, the Gingriches signed books and mingled for more than an hour with several hundred supporters, and posed for a photo with several service members wearing fatigues.

Many of those who attended the event gushed about Gingrich’s debating skills and his knowledge of history as well as his decision to hold an event in a state not typically frequented by candidates early on in the primary cycle.

“I have wanted him from Day One, but he was so low in the polls and so discounted by the country, that I, like everybody — I’m a member of the tea party, I’m a member of the Republican committee on Staten Island — and I kept looking,” Tom Mannix, a 63-year-old retired telecommunications director from Staten Island, said of Gingrich.

It was also clear that Cain’s fall had already taken a toll.

“For a while it was Bachmann,” Mannix said of his choice in the race. “For a very, very, very short time, it was Perry. And I thought Herman Cain had a tremendous amount of ideas economically. But when I started reading what he doesn’t know about foreign policy, I said, ‘We can’t afford that.’ ”

Some at the event cited Gingrich’s considerable baggage — which includes three extramarital affairs and decades as a Washington insider — but did not say that it was an obstacle to his winning the nomination.

“I asked, ‘Can I ask a question?’ I said, ‘Why should I vote for you when you had to quit being speaker of the House?’ ” said Carlton Phillips, a 77-year-old Staten Island retiree who said his top choice was Rep. Michele Bachmann (R-Minn.) but who was actively considering Gingrich. “But these days, they say you don’t look back at what you did wrong before.”

Several attendees said they remained undecided among the various GOP hopefuls. One name that did not come up often — at least, not positively — was Romney’s.

“Mitt Romney is, to me, a Republican version of Bill Clinton,” said Mannix. “Everything washes off his back. He changes his mind. He flip-flops. He had health care in Massachusetts. There’s just too many things with him where it’s this one day and that the other.”

Mannix added that ultimately, “most of the people who were backing Cain are going to be tea party members who would’ve been skeptical of Romney all along — and if they’ve got to move to someplace, I believe they’ll move to Newt.”

Some at the event said they were glad that Cain was leaving the race but had lingering questions.

Asked Phillips: “What’s he gonna do with all the money?”