Perry had other thoughts, calling Gingrich a "conservative visionary who can transform our country."
Echoing words Huntsman said of Romney, Perry said he and Gingrich had their differences.
And in saying the former speaker was not perfect, he sought to provide political cover of a type that might reassure South Carolina voters for whom religious values are important.
"The fact is, there is forgiveness for those who seek God and I believe in the power of redemption, for it is a central tenet of my own Christian faith," Perry said.
His decision to withdraw set off a scramble among the remaining contenders for the allegiance of his supporters and donors, both in the state and nationally.
State Rep. Chip Limehouse of Charleston said he was expecting to speak by phone with both Romney and Gingrich later in the day before making up his mind.
"I'm looking and I really do think tonight's debate will determine the next president of the United States. That's how important it is," Peeler said.
Perry's exit marked the end of a campaign that began with soaring expectations but quickly faded. He shot to the head of the public opinion polls when he announced his candidacy last summer, but a string of poor debate performances soon led to a decline in support.
His defining moment came at one debate when he unaccountably could not recall the third of three federal agencies he has promised to abolish. He joked about it afterward but never recovered from the fumble.
In his farewell appearance as a candidate, he said he was bowing out of the 2012 campaign, seemingly a hint he would run again in four years if Republicans fail to win the White House this time.
An aide, Ray Sullivan was more explicit, telling reporters Perry hasn't ruled out running for governor again or for the White House in 2016 if Obama is re-elected.
Associated Press writers Thomas Beaumont, Beth Fouhy, Philip Elliott, Kasie Hunt and Shannon McCaffrey in South Carolina contributed to this story.