Rick Perry on Friday held firm that President Obama has declared war on religion and said that, if he becomes president and there’s a time of crisis, he would call a day of national prayer.

As evidence of Obama’s war on religion, a phrase Perry uses in a new TV ad being aired in Iowa, he cited the president’s appointment of what he described as activist U.S. Supreme Court justices: Sonia Sotomayor and Elena Kagan.

The Texas governor and 2012 Republican presidential candidate also noted what he calls the “ministerial exception,” which involves the degree to which religious groups should be excluded from anti-discrimination laws. The U.S. Supreme Court in October heard a case where it was argued that a Lutheran elementary school in Michigan illegally fired a teacher in violation of the Americans With Disabilities Act.

“I do think that this president is conducting what I consider to be an attack on traditional religious organizations and/or traditional religious values by those two examples,” Perry said in an editorial board meeting with The Des Moines Register.

Perry says in the ad that he would “end Obama’s war on religion.” He also says in the ad, “You don’t need to be in the pew every Sunday to know 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.

Sotomayor is the first Hispanic judge in the court’s 222-year history and was criticized by Republicans during her 2009 confirmation hearings regarding remarks she made in 2001 indicating that a “wise Latina” with richer life experience could reach a better decision in court than a white male.

Kagan has been criticized for “her lengthy resume of zealous advocacy for political and ideological causes,” words spoken after her 2010 confirmation by Senate Minority Leader Mitch McDonnell, R-Kentucky.

Perry in August held a massive prayer rally in Houston. Friday, he said he would do the same on a national level as president if the nation faces a crisis.

“The idea that I wouldn’t would be counter to who I am,” Perry said. “If Americans want to elect a president who basically says, ‘I’m not going to let my faith intervene in anything I do’ would be a bit — from my perspective — would be a bit scary.”

Perry spent much of his time with the Register by emphasizing his executive experience as a governor and calling himself a consistent conservative, an indirect comparison with rivals ahead of him in the polls: former U.S. House Speaker Newt Gingrich and former Massachusetts governor Mitt Romney. Fellow candidates have attacked both for changing past positions.

“That is the key issue for this country: Who is it that has executive government experience that can go in on day one and can put into place policies to get Americans working,” Perry said.

Perry entered the race in August with much fanfare, focusing primarily on job creation and economic growth. After some gaffes in debates and increased scrutiny on his immigration record and other positions, he sank to the single digits in many polls.

The new focus on values is a sign of new urgency to reach out to conservative Iowa caucusgoers, said Larry Sabato, director of the University of Virginia Center for Politics. However, should Perry turn his campaign around and ultimately win the nomination, the statements could cause him trouble in the general election because many people interpret statements like those in the ad as offensive, Sabato predicted.

“You can say I disagree with the president, but to call him anti-religious is a bit much,” Saboto said. “You criticize their decisions. You don’t go after them personally or question their religious beliefs.

Sabato continued: “He’s desperate, and he’s throwing everything into Iowa. This is his chance. If he’s not going to break through in Iowa, he’s not going to break through, period.