Gov. Rick Perry, struggling to revive his presidential campaign, is stoking the culture wars with an edgy new TV ad railing against policies that allow gays to serve openly in the military but keep overt religious displays out of public schools.

“I’m not ashamed to admit I’m a Christian,” Perry says in the 30 second TV ad. “But you don’t need to be in the pews every Sunday to know that there’s something wrong in this country when gays can serve openly in the military but our kids can’t openly celebrate Christmas or pray in school.”

Perry says in the ad that he would end “Obama’s war on religion” and will fight against “liberal attacks on our religious heritage.”

The Texas Tribune thanks its sponsors. Become one.

“Faith made America strong,” Perry says into the camera. “It can make her strong again.”

The ad drew swift rebukes from gay rights groups and liberal activists. The Log Cabin Republicans, which supports gay rights, issued a statement saying Perry needs to be reminded that he's running for president, not "Theocrat-In-Chief."

Perry has made a series of overt appeals to evangelical voters in the 2012 election by promoting his faith and accusing his opponents of denigrating people of faith. Even before he announced for president on Aug. 13, Perry staged a gigantic rally in Houston, called The Response, which was seen as a clever way to drum up support from religious conservatives.

In an interview a month ago with ABC News, Perry said the now discarded “don’t ask don’t tell” policy worked well and contended that lifting the ban on gays serving openly in the military was “irresponsible.”

Perry spokesman Mark Miner said the ad was or would be running on TV stations in Iowa. According to a report in Politico, Perry has bought $1 million worth of TV time to flood the airwaves with advertising.

The governor will travel to South Carolina this week to tout support from veterans this week, but he is mostly focusing his attention on Iowa as the Jan. 3 caucuses draw near. A recent Des Moines Register poll showed Perry tied with Rick Santorum at 6 percent, but Perry insiders believe the governor has moved higher than that in recent days.

One official familiar with the campaign strategy said the latest ad is targeted toward evangelical voters who make up a disproportionate share of the electorate in Iowa and is designed to show the “moral fabric of our country is out of whack.”

Texas Tribune donors or members may be quoted or mentioned in our stories, or may be the subject of them. For a complete list of contributors, click here.

Get The Brief

Never miss a moment in Texas politics with our daily newsletter.