Rick Perry's abrupt swing to the right on gay rights has been described as smelling like desperation.

Perry's campaign on Tuesday released a decidedly anti-gay ad titled Strong in Iowa. In the ad, Perry linked faith to anti-gay sentiment.

(Related: Rick Perry described as having “special a-hole privileges” in video spoof.)

During a Thursday appearance on MSNBC's Martin Bashir, political contributor Krystal Ball slammed the new ad.

“It smacks of desperation because Rick Perry knows that if voters go to caucus and they're thinking about the economy or who has the best grasp of the issues or the best leader, they won't vote for him,” Ball said. “So he has to frame this as a values thing. It's the red meat about Obama and the same race-baiting stuff they have been doing all along. But this is also about Mitt Romney being Mormon, it's also about Newt Gingrich and his past infidelities. So for Rick Perry, that's why he's doing this very despicable and cynical framing.”

Perry laments in the ad that there's something “wrong” with a country where gay and bisexual troops can serve openly but children cannot openly celebrate Christmas.

“I want to point out how outside of the mainstream this anti-gay ad is,” Ball added. “At the time of repeal [of 'Don't Ask, Don't Tell'], 80% of Americans were supporting repeal. Since repeal was instituted, even the public face of the opposition, who was Marine General Amos, he said it's been a nonevent. That's how far the GOP has moved outside of the mainstream.”