Republican presidential candidate Mitt Romney was under pressure on Thursday to turn back a strong challenge from rival Newt Gingrich at perhaps the most crucial debate yet in the 2012 campaign.

The CNN-sponsored debate culminated a chaotic day of campaigning highlighted by the abrupt departure of Texas Governor Rick Perry as the candidates sought to outmanoeuvre each other ahead of South Carolina's primary vote on Saturday.

The two-hour debate, which started just after 8 p.m., was the final chance for rivals to chip away at Romney's lead in South Carolina and Gingrich, the former speaker of the U.S. House of Representatives, had perhaps the best shot.

Romney will take a huge step toward claiming the Republican nomination if he wins on Saturday.

Fighting for their political lives at the debate were former Pennsylvania Senator Rick Santorum and libertarian Congressman Ron Paul of Texas.

Some polls showed Gingrich closing a large gap with Romney by attacking Romney's past as head of a private equity firm and labelling him a Massachusetts moderate.

He got a boost when Perry endorsed him.

A lot of good things are happening, Gingrich told reporters in Beaufort.

A strong performance in a debate in South Carolina on Monday helped him get within touching distance in the polls of Romney, who has struggled to explain why he has not released his tax forms.

But Gingrich has faced troubling questions that could halt his momentum. His ex-wife, Marianne, told ABC News that Gingrich had sought an open marriage while having an affair with current wife Callista. She said he should not be considered electable in the race to find a Republican challenger to Democratic President Barack Obama in next November's election.

GINGRICH CATCHING UP

A new Reuters/Ipsos poll conducted of 656 likely South Carolina voters showed Romney with 35 percent support, Gingrich with 23 percent support, and former Senator Rick Santorum with 15 percent support.

Romney was looking for a rebound to boost his momentum after the surprise news from Iowa on Thursday that he did not receive the eight-vote victory that he had believed on January 3.

A formal count by Iowa election officials gave the nod to Santorum by a mere 34 votes, puncturing the aura of inevitability that Romney's campaign has sought to portray.

Santorum, speaking to a Southern Republican conference in Charleston, derisively criticized Romney and Gingrich for their positions on healthcare and bank bailouts.

How are we going to differentiate ourselves on the major issues of the day if we nominate tweedle dum and tweedle dee instead of someone who stood up and said 'no'? he said.

Romney has struggled in the first campaign primary in the South, coming under pressure to release his tax returns and trying to convince conservative voters they should be comfortable with him despite a more moderate record.

His campaign suddenly looked beatable in South Carolina.

I don't think this thing is over at all, this is what happens in primaries, said state Republican Party head Chad Connelly.

Gingrich was connecting with South Carolina voters who like that he is from neighbouring Georgia.

Well, Mitt Romney is not from around here and Newt is more in touch with what happens in the lives of the people of South Carolina, said Ellie Thomas, a Walterboro resident who attended a Gingrich event there.

(Additional reporting By Sarah Irwin)