Another debating misstep could end Rick Perry's presidential campaign, rival candidate Newt Gingrich said Thursday. 

Gingrich, whose steady performances at the GOP presidential debates have lifted him in the polls, defended Perry’s intellect but warned another gaffe could doom the Texas governor's hopes for winning the GOP presidential nomination.

Speaking on Fox News Channel’s "The O’Reilly Factor," Gingrich said that candidates always fear that what happened to Perry onstage could happen to them.

“I'm very sympathetic to Gov. Rick Perry. He's a very smart man,” Gingrich said. “He's the longest-serving governor in the history of Texas, and I always worry when I go into these debates because there's now an exaggerated expectation of how well I'll do.”

On Wednesday night, Rick Perry said he would eliminate three government agencies but was only able to name two. He struggled for almost a full minute to remember the third, before conceding that he could not.

“I always have this fear that something will happen to me exactly as happened to Rick last night,” Gingrich continued. “So I mean, my heart goes out to him. I wasn't gloating at that point. I was thinking, 'Wow, that could have happened to any one of us.'

“It was a very, very hard moment,” he added.

Gingrich also had some advice for the governor.

“My recommendation to him would be do lots of town-hall meetings," he said. “Let people ask you lots of questions. He's either going to get a lot better at it or he's not going to be in the race.”

The Gingrich campaign stumbled out of the gate after questions arose over a $500,000 line of credit at Tiffany’s, and after his campaign lost key members of its staff who said the former House Speaker wasn’t committed to his campaign.

But he’s since gained in the polls, and conservative pundits have attributed this to his performances at the debates.

“I mean, one of the most interesting stories of this campaign has been that some people could go out and raise huge amounts of money, but they couldn't survive the debates,” Gingrich said, in an apparent swipe at Perry.

“Other people who did not have much money ... gradually made bigger and bigger impressions because of the debates,” he continued. “I think Herman Cain took off because of the debate in Florida, and without that, he might never have had a chance to be the front-runner.”