During a speech to the Eagle Forum on Friday, former Texas governor Rick Perry announced he was suspending his campaign for the 2016 Republican nomination. (Video: Reuters)

This story was originally published at 5:23 p.m. It has been updated.

ST. LOUIS -- Former Texas governor Rick Perry effectively ended his second campaign for president Friday, becoming the first candidate to exit the race as his attempt to mount a do-over of his disastrous 2012 run fell short.

"When I gave my life to Christ, I said, 'Your ways are greater than my ways. Your will is superior to mine,'" Perry told the audience of several hundred activists at the conservative Eagle Forum's summit. "Today I submit to you His will remains a mystery, but some things have become clear to me. That is why today I am suspending my campaign for the presidency of the United States."

Perry had struggled to rise in polls and failed to qualify for last month's prime-time debate in Cleveland -- a major setback. He appeared in the undercard debate, only to see Carly Fiorina, a former technology executive, have what many observers considered a breakout performance.

In an interview last month, as the campaign stopped paying staffers amid mounting money woes, Perry's team insisted it saw a path forward that would keep the former Texas governor's candidacy alive to the start of next year's caucuses and primaries.

“At the end of the day, it’s not the national poll numbers that will dictate who our nominee is,” campaign manager Jeff Miller said. “It’s who can perform well in these early states.”

[August: Rick Perry's campaign details a path forward despite money woes]

In the weeks leading up to the Cleveland debate, Perry aggressively took on front-runner Donald Trump, calling the celebrity billionaire "a cancer on conservatism" and his campaign "a barking carnival act."

The move did Perry no good in the polls, as Ohio Gov. John Kasich edged him out to earn the 10th and final spot in the prime-time faceoff. The campaign withered away, which Iowa campaign chairman Sam Clovis leaving, then joining Trump's presidential bid.

[August: The zombie apocalypse has arrived has arrived, and it's in Iowa with Rick Perry]

Miller said last month that the governor had "zero" regrets about taking on Trump.

“The governor did it because it was the right thing to do," Miller said. "He did it knowing that it may not be helpful, but he would do it all over again, and I would advise him to do it all over again. You know the governor. He’s going to continue doing what he believes is right. He’s not going to placate for poll numbers.”

[Earlier Friday afternoon: A list of all the things Rick Perry's campaign still has going for him]

Although news of Perry's suspension broke online just minutes after his talk began, Perry did not mention it for the first 30 minutes of his talk to the Eagle Council, a conservative gathering in St. Louis. The only hint came in something he said to Eagle Forum President Ed Martin on the way to the microphone.

"We'll make a little history here," Martin recalled him saying.

It was a bitter bit of deja vu for Perry, as yet another presidential bid ended early in disappointment.

When Perry joined the 2012 race, he was seen as a potentially serious contender for the GOP nomination -- the long-serving governor of a major state that had led the nation in job creation. His Southern roots and tea-party appeal made him a candidate feared by his GOP rivals, particularly those in the campaign of Mitt Romney.

Within weeks of announcing, he had risen to the top of the polls. Almost immediately, he began to fall back, his campaign damaged by attacks from Romney and his team as well as a series of poor debate performances.

His campaign took a substantial hit at a Florida debate when he came under attack for a Texas policy allowing children of illegal immigrants to pay in-state tuition at state colleges. Perry accused his critics of not having a heart, but the damage was done.

His worst moment came at a later debate in Michigan when he could not remember all of the federal agencies he had been vowing to eliminate as president. His final word as he admitted he couldn’t recall the names was “Oops.”

[After 'oops,' Rick Perry is ready to try again]

That became the caricature of Perry as a poorly prepared candidate. It was an image he was determined to erase as he looked toward the 2016 campaign. Perry was candid about the mistakes he made in that first campaign and in the intervening time immersed himself in the details of domestic and international policies. He said he believed voters were willing to give him a second chance.

During the past two years, as he traveled the country, he earned positive reviews from one-time critics, who said they saw in him a more substantial and attractive candidate than in 2012. This year, in a more competitive 17-candidate field, it wasn't enough.

[Rick Perry's two very different presidential campaigns]

Several of the other 2016 GOP contenders -- including Trump -- reacted quickly Friday with praise for Perry.

"I think it shows what an extraordinary thing it is to run for the presidency that someone who is a very popular multi-term governor from a big state still didn't resonate enough to really get a campaign going," Sen. Rand Paul (Ky.) told reporters just after landing in Des Moines, Iowa for a campaign swing.

Paul also took a dig at Donald Trump: "I think you could make the argument that a celebrity reality TV star might have less of an ability to lead a nation than the former governor of Texas."

Sen. Ted Cruz (R-Tex.) had deep praise for Perry. "Because of his principled leadership as the longest-serving governor in the state's history, Texas has become a haven for freedom, entrepreneurship, and limitless opportunity," he said in a statement. "The entire Republican field was unquestionably made stronger by the experience and wisdom he brought to the race."

A Cruz aide said the campaign believed they would reap the most from his fellow Texan's exit, calling Cruz's presidential effort a natural second stop for deep-pocketed Perry donors and Texas supporters. Perry's exit will also help the senator collect more delegates in their home state, said the aide, and -- in the campaign's estimation -- help Cruz lock down his home state in the March 1 primary.

Cruz's wasn't the only campaign looking to stake a claim to Perry's supporters: former Florida governor Jeb Bush, Wisconsin Gov. Scott Walker, Kasich and Fiorina or their campaigns had all reached out to major Perry donors in recent days, in anticipation of Friday’s news.

Former Arkansas governor Mike Huckabee, who followed Perry onstage in St. Louis Friday, joked about the surprise decision to a slightly diminished crowd.

"I told him backstage: One down, 15 to go!" Huckabee said. "I was challenged to do everything I could and make as big a splash as he did. So I'm here to say: I'm not dropping out of the race."

Huckabee quickly switched gears, and pledged that if elected, Perry would get a role in his administration. "Let me say, in all candor, that the only thing harder than to get into a race is the decision to get out of a race," he said. "I've been there before. My heart goes out to Rick and Anita, and I hope you will offer your hearts and their prayers for their future success."

When he began his speech Friday, Perry spoke at length about his own background and accomplishments in Texas, taking advantage of a moment that -- if the audience didn't know it yet -- marked his exit from the American political stage. He spoke about growing up in rural Paint Creek, Tex., seeing the world in the Air Force, and about his 14 years as governor of Texas.

"That’s conservative governance. That’s giving people the opportunity to succeed in life," he said, talking through his state's changes in health care and education, and the growth of its economy. He turned almost to a whisper at one point, putting extra emphasis on the words: "Making people’s lives better. That’s what conservatism is really all about. We gotta get back to it."

The former Texas governor on immigration: "If Washington refuses to secure the border, Texas will." Here's more Rick Perry, in his own words. (Video: Julie Percha/The Washington Post)

Perry also used his speech to criticize President Obama's record and to attack Trump as, in essence, embodying an un-Christian attitude toward immigrants and Latinos generally.

"Our brothers and sisters are those who are made in the image of God. And our obligation, after loving God … is to love our neighbors as ourselves, regardless of where they come from," Perry said. "Demeaning people of Hispanic heritage is not just ignorant, it betrays the example of Christ."

For those first 30 minutes, Perry seemed to be doing what he'd always done in this election -- though without much success. This was the case for new leadership, and for him as that leader.

Then, abruptly, it became a goodbye. The audience remained silent when Perry announced his campaign was over.

"I give you this news with no regrets," Perry said afterward. "We have a house in the country. We have two beautiful children. Two absolutely adorable, beautiful, smart granddaughters, four dogs, and the absolute best sunset you have ever seen from the back porch of that house." At that point, the audience applauded for the first time since he'd broken the news.

"Indeed, life is good," Perry said, seeming to choke up slightly. "I am a blessed man."

Sean Sullivan and Katie Zezima contributed to this story