DALLAS — Rick Perry’s decision to suspend his presidential bid before the South Carolina primary was one of his savviest moves in many months. Rather than suffer the humiliation of a single-digit showing in South Carolina’s primary this weekend, the Texas governor cut his losses and headed home.

Perry not only got out before being crushed, but also, by endorsing Newt Gingrich over Mitt Romney, he picked a winner, at least in South Carolina.

Texas Gov. Rick Perry at Hyatt Place Jan. 19, 2012 in North Charleston, S.C. Perry, who placed fifth in Iowa and New Hampshire, withdrew from the presidential race. (Allison Joyce/Getty Images)

His mistakes are now a familiar litany: He forgot how many Supreme Court justices there are, claimed that Turkey is run by” Islamic terrorists,” misidentified the voting age, said Texas teaches creationism in public schools and, most famously, cried “oops’’ during a presidential debate when he couldn’t name of the third federal agency he wanted to abolish.

Since Perry and his entourage landed in Austin Friday, the consensus here in the state is that while the governor didn’t necessarily “do us proud’’ out there on the national stage, few think Perry did himself permanent political damage.

Perry may have been weak on the stump, but many Texans prefer to focus on the fact that at least he knows when to fold ‘em. By throwing his support to Gingrich, he also signaled that he wasn’t kowtowing to the “vulture capitalist’’ crowd around his nemesis Romney.

Although he was upbraided by some within the party for seeming hostile to businesses with the “vulture capitalist” criticism of Romney, Perry is still a darling of the big-money crowd in Texas. More than half of his presidential campaign cash came from Texas in the third quarter, and the vast majority of it was from large donors, his campaign reports show.

The Texas governor raised more than $17 million in the third quarter alone for his first bid for national office. And more than half of that — 57 percent — came from Texas, according to the analysis by the Center for Responsive Politics.

These are not pickup truck-driving Texans. Only about 4 percent of the Perry donations were from small contributors who gave $200 or less.

With Perry out of the race and Gingrich riding high after South Carolina, those big donors will be looking for someone else to show them the path forward.

Meanwhile, Perry will be mending fences at a crucial time for the Texas GOP.

The state’s congressional district map is in flux. Just Friday, the U.S. Supreme Court blocked use of an interim map drawn by a San Antonio court. That puts the focus back on a map drawn by the Republican-controlled state legislature, but the outcome is still unclear.

Meanwhile, some longtime state legislators are retiring and tea party candidates are vying for those and other seats against traditional conservatives.

There are still opportunities for Perry to reestablish himself at home. No one here has written his political obituary just yet.

Lori Stahl is a Dallas-based journalist.