Newt Gingrich hit back at allegations of impropriety with a robust debate performance that, judging by a standing ovation it received a South Carolina audience, instantly improved his chances of winning the state’s primary on Saturday.

Newt Gingrich hit back at allegations of impropriety with a robust debate performance that, judging by a standing ovation it received a South Carolina audience, instantly improved his chances of winning the state’s primary on Saturday.

The former Speaker’s second wife Marianne had made headlines earlier with an ABC television interview accusing him of asking for an open marriage as he admitted a six-year affair with the congressional aide Callista, who soon became his third wife.

CNN’s moderator John King opened the 17th debate of the primary season with a direct invitation to Mr Gingrich respond to the allegation.

“I am appalled you would begin a presidential debate on a topic like that,” he responded.

“Every person in here knows personal pain. Every person in here has had someone close to them go through painful things. To take an ex-wife and make it two days before the primary a significant question for a presidential campaign is as close to despicable as anything I can imagine.”

Encouraged as the crowd rose to its feet in applause, he turned his ire on the media in general: “I am tired of the elite media protecting Barack Obama by attacking Republicans. The destructive, vicious negative nature of much of the news media makes it harder to govern this country, harder to attract decent people to run for public office.”

Pressed further on the allegations, he said: “Let me be quite clear. The story is false. Every personal friend I have who knew us in that period said the story was false. We offered several of them to ABC to prove it was false. They weren't interested because they would like to attack any Republican.”

The debate came at the end of day of high drama in the Republican nomination battle.

Rick Perry, the governor of Texas, dropped out of the race and endorsed Mr Gingrich, who polls showed was closing fast on the front-runner Mitt Romney.

The former governor of Massachusetts meanwhile learned that he had not won the Iowa caucuses by eight votes but lost by 34 votes to Rick Santorum, the former Pennsylvania senator.

With only four candidates on stage and the stakes high, the exchanges were among the sharpest so far.

Mr Romney and the others declined the opportunity to exploit the allegations about Mr Gingrich, though the front-runner did point out in his opening remarks to the fact that he had been married for 42 years.

But the politeness ended there. Mr Santorum said that during his time as speaker Mr Gingrich had shown no discipline. “It was an idea a minute,” he said, adding that his rival had failed to tackle corruption in Congress.

Mr Romney tried to deflate Mr Gingrich’s boasts about being an ally of Ronald Reagan, who is still regarded as the epitome of a Republican president.

He said he had reread Mr Reagan’s diaries and found that Mr Gingrich was only mentioned once. “He said you mentioned one idea and it wasn’t very good. Even my Dad was mentioned once,” he said, referring to George Romney, a former Michigan governor and candidate in the 1968 Republican primary.

Mr Santorum criticised Mr Gingrich’s support of the principle of individually-mandated health insurance, which is at the heart of the health care reform passed by President Barack Obama that every Republican has vowed to repeal.

It would, he said, make debating the issue with Mr Obama difficult.

“You can’t run rings around the fact that you supported the core basis of what President Obama put in place,” he said.

“I can,” retorted Mr Gingrich, while conceding the point. “I can say ‘I was wrong and figured it out, you were wrong and didn’t’.”

After enduring the worst few days of his campaign, Romney again struggled to find a firm answer to the question of when he would release his tax returns.

He said he would release them after the normal filing time in April or May but couldn’t specify how many years he would release and grasped at the straw of warning that the Democrats would attack him for being successful.

“I am not going to apologise for being successful,” he said.

He was however knocked off balance when asked if he would follow the example his father set in 1967 by releasing 12 years’ return at once. “I don’t know,” he said.

Attacked for “vulture capitalism” while he led the corporate buy-out firm Bain Capital, Mr Romney has struggled to repress an image of elite detachment.

He strained to point out that he had not inherited money from his father but “what I had I earned, I worked hard on my own”.

Getting slightly carried away with the point, he said: “We need to send someone to Washington who has lived on real streets of America, who has lived in private sector.”