NORTH CHARLESTON, S.C. — Texas Gov. Rick Perry ended his bid for the Republican presidential nomination today and threw his support behind former House speaker Newt Gingrich.

“I have come to the conclusion that this is no viable path forward for me in this 2012 campaign,” said Rick Perry. “Therefore I am suspending my campaign and endorsing Newt Gingrich for president of the United States.”

Gingrich said he was “humbled and honored” to have Perry’s endorsement, adding: “South Carolinians have a chance this Saturday to nominate a bold Reagan conservative who will offer a dramatic contrast with President Obama this fall in the general election.”

Former Massachusetts governor Mitt Romney, the current frontrunner for the Republican presidential nomination, called Perry a “great man” who had “made a real contribution” in the race.

Perry’s announcement came just hours before the candidates will gather for their 16th debate of the Republican race and just two days before the South Carolina primary.

For the last several months, it had become clear that Perry would not be a major factor in the race — hamstrung by a string of lackluster debate performances that culminated in his inability to name the three federal agencies that he would eliminate if elected president.

One early Perry fundraiser, who soured on the campaign as the candidate repeatedly stumbled, said the decision “was a foregone conclusion to what has been quite possibly the worst-run presidential campaign of our lifetimes.”

Following a fifth-place finish in Iowa, Perry said that he would return to Texas to reassess his candidacy. But, less than 24 hours later he announced — via Twitter! — that he would continue in the race.

Perry effectively skipped the New Hampshire primary on Jan. 10, where he took a meager 1 percent of the vote, to focus his time and money on South Carolina.

But polling released over the last several days made clear that Perry was gaining no traction in the Palmetto State. In an NBC/Marist survey of South Carolinians released this morning, he took just 4 percent.

View Photo Gallery: The Texas governor is dropping out of the 2012 GOP presidential race.

Gingrich, on the other hand, is gaining momentum in the Palmetto State following a strong showing in a debate on Monday night. Gingrich and Perry have known each other for quite some time; the former Speaker wrote the introduction to Perry’s book, “Fed Up!”

In October, Gingrich told the Post’s Karen Tumulty that when Perry got in the race, he had told wife and staff: “If Rick can hit major-league pitching, he’s the nominee. We won’t be able to stop him.”

But he was later “stunned,” he said, by Perry’s ineptitude at the debates. “I was surprised by the inability to adjust and modify and shift.”

Given Perry’s lack of traction in South Carolina, it’s tough to see his exit having a major effect on the dynamics of the state’s primary.

Perry was seen as pulling from the same pool of voters as Gingrich and former Pennsylvania senator Rick Santorum — the conservative alternatives to Romney — and his exit could help Gingrich in particular if he can steer his donors and supporters in the former House speaker’s direction.

But Romney’s campaign suggested it won’t matter much.

“We won’t do anything differently today than we did yesterday,” said Romney chief strategist Stuart Stevens in an interview. “I think we would get Perry voters. This thing’s never monolithic.”

Staff writers Karen Tumulty, Dan Eggen, Philip Rucker and Aaron Blake contributed to this report.


Marianne Gingrich: Newt asked for 'open marriage'

Santorum edged Romney in Iowa vote

Gingrich sees a South Carolina surge

Santorum’s erroneous marriage attack on Obama