BEAUFORT, S.C. — In an up-and-down campaign day, Republican presidential candidate Newt Gingrich picked up an endorsement Thursday from former rival Rick Perry but also faced explosive accusations from one of his former wives the he had asked her for permission to have an "open marriage" after she learned he was having an affair.

The former House speaker disputed his ex-wife's account, with spokesman R.C. Hammond telling The Associated Press: "It couldn't be any more opposite of the truth."

Gingrich also prepared to release his 2010 income tax returns, a move certain to bring fresh scrutiny to his campaign, roughly a half hour before he would take the stage in Charleston to debate his remaining rivals.

Two days before the pivotal South Carolina primary, Gingrich's political and private life were clashing just as new polls showed him rising as he looks to overtake GOP front-runner Mitt Romney in the third state to weigh in on the presidential race. Gingrich has seen his crowds grow in recent days after a strong performance in a debate Monday.

It was unclear how the new revelations from Marianne Gingrich would play in a state where religious and socially conservative voters hold sway.

Equally uncertain was whether Gingrich would get a boost from Perry's endorsement, given that the Texas governor had little support in the state, and get conservative voters to coalesce behind his candidacy. Complicating Gingrich's effort is another conservative, Rick Santorum, who threatens to siphon his support.

"Newt is not perfect but who among us is," Perry said as he bowed out of the race and called Gingrich a "conservative visionary."

It was all but certainly intended to provide political cover for Gingrich with evangelicals here ahead of the interview with Marianne Gingrich, her first on television since the divorce from Gingrich in 2000, that ABC News was set to broadcast Thursday night.

In excerpts the network released earlier in the day, Marianne Gingrich said that when she learned of Gingrich's affair with Callista Bisek, a congressional staffer, he asked his wife to share him.

"And I just stared at him and he said, 'Callista doesn't care what I do,'" Gingrich' second wife said. "He wanted an open marriage and I refused."

Hours after the excerpts were released, Gingrich brushed aside reporters' questions after a campaign event along the waterfront in Beaufort, S.C.

"Look, I'm not going to say anything about Marianne. My two daughters have already written to ABC complaining about this as tawdry and inappropriate," he said, referring all queries about his second marriage to his two daughters from his first marriage, Kathy Lubbers and Jackie Cushman.

"I'm not getting involved," said Gingrich, who has said the past that tough questions are fair game for a candidate running for president.

Later in the day, Hammond told the AP that Gingrich never asked Marianne Gingrich for an "open marriage" and suggested, like Gingrich's daughters did a day earlier, that Marianne Gingrich's comments may be suspect given the emotional toll divorce takes on everyone involved.

"Divorces are very tough and people have very different recollections of how things happen," Hammond said.

The television interview with Marianne Gingrich threw a wild card into the race in its final hours.

Its mere existence shines a spotlight on a part of Gingrich's past that could turn off Republican voters in a state filled with religious and cultural conservatives who may cringe at his two divorces and acknowledged marital infidelities.

Marianne Gingrich has said Gingrich proposed to her before the divorce from his first wife was final in 1981; they were married six months later. Her marriage to Gingrich ended in divorce in 2000, and Gingrich has admitted he'd already taken up with Callista Bisek, a former congressional aide who would become his third wife. The speaker who pilloried President Bill Clinton for his affair with Monica Lewinsky was himself having an affair at the time.

A CNN/Time South Carolina poll released Wednesday showed Gingrich in second place with support from 23 percent of likely primary voters, having gained 5 percentage points in the past two weeks. Romney led in the poll with 33 percent, but he had slipped some since the last survey. Santorum was third, narrowly ahead of Texas Rep. Ron Paul and well ahead of Perry.

Regardless of the South Carolina outcome, Gingrich was making plans to compete in Florida's primary on Jan. 31.

Confidence exuded from Gingrich, who rose in Iowa only to be knocked off course after sustaining $3 million in attack ads in Iowa from an outside group that supports Romney. Gingrich posted dismal showings in both Iowa and New Hampshire.

By the time the race turned to South Carolina, he was sharply criticizing Romney as a social moderate who is timid about attacking the nation's economic troubles. He also raised questions about Romney's experience as a venture capitalist, while a super PAC that supports Gingrich aggressively attacked Romney as a vicious corporate raider. Gingrich also ripped Romney for standing by as a super PAC run by former top Romney political aides continued to attack him in South Carolina.

Romney ended up on the defensive and by Monday night's debate, Gingrich was back in command. He earned a standing ovation when he labeled Democratic President Barack Obama "the best food stamp president in American history." The clip became the centerpiece of a television ad that began airing Wednesday as Gingrich worked to cast himself as the Republican with the best chance of beating Obama in the fall, stealing a page from Romney's playbook.

Said Gingrich senior adviser David Winston: "His taking on Barack Obama showed a toughness and an electability that the electorate is looking for."

Since then, Romney's campaign, sensing Gingrich's rise and working to deflect from its own troubles, has been trying to undercut Gingrich's claim that he helped President Ronald Reagan create millions of jobs in the 1980s, likening it to "Al Gore taking credit for the Internet."

Romney also dispatched supporters to make the case that Gingrich is erratic and unreliable. A new Romney Web video features former Republican Rep. Susan Molinari of New York saying Gingrich lacked discipline and labeling his time as speaker "leadership by chaos."

Gingrich, for his part, has been helped by the fact that Santorum has seemed unable to capitalize on the endorsement of a group of influential Christian conservatives. Those who aren't backing the former Pennsylvania senator seem to be coming Gingrich's way.