The Obamas walk from the White House to a nearby church on Sunday. (Manuel Balce Ceneta/AP)

President Obama and Republican challenger Mitt Romney, interviewed separately by a religious magazine, addressed skeptics who question their faith and offered divergent views of the separation of church and state.

Their remarks were published in the midsummer issue of Cathedral Age, a quarterly magazine of the Washington National Cathedral, which said the interviews produced “the most transparent look yet into the faith of the two candidates.”

The religious faith of the presidential candidates has played a smaller role to date in the 2012 campaign than in others in recent times, perhaps because of both camps’ focus on the country’s parlous economic recovery. But in answering identical questions from the magazine, Obama and Romney readily discussed their religions, using the interviews to address separation of church and state, public controversies around their own faiths and religion as a driving motivation for their political standpoints.

Though often cautious, the candidates’ differing responses to the same questions set out their ideas on faith in public life. One area where the tone of the two candidates differed markedly was on the separation of church and state.

Romney suggested that the role of faith in public life is perhaps under threat and relies on the judiciary to keep it in place.

“We should acknowledge the Creator, as did the Founders — in ceremony and word,” he said. “He should remain on our currency, in our pledge, in the teaching of our history, and during the holiday season, nativity scenes and menorahs should be welcome in our public places. Our greatness would not long endure without judges who respect the foundation of faith upon which our Constitution rests.”

He went on to expand on this theme later in his interview:

“In recent years, the notion of the separation of church and state has been taken by some well beyond its original meaning. They seek to remove from the public domain any acknowledgment of God.

“Religion is seen as merely a private affair with no place in public life. The Founders proscribed the establishment of a state religion, but they did not countenance the elimination of religion from the public square.”

The positioning of the dividing line between church and state is an issue that resonates with parts of both the liberal and conservative bases of each candidate’s party. Of the two, Obama appeared keener than his rival to endorse the status quo.

“The constitutional principle of a separation between church and state has served our nation well since our founding — embraced by people of faith and those of no faith at all throughout our history — and it has been paramount in our work,” he said.

Obama cited as an example of this principle an executive order he signed in 2010 on federal funding for faith groups.

The order clarified that religious groups can provide services with federal funding without removing religious imagery or scripture, but it said beneficiaries of programs must be given referrals to alternative providers if they wish. And it stressed that explicit religious activity must be kept separate “in time and location” from any federally supported programs.

Both candidates also used the interview to respond to those questioning their faith. A Pew Research poll of 3,000 Americans conducted in June and July found that 17 percent of voters incorrectly believe President Obama is a Muslim, up from 12 percent in a similar poll in 2008.

Asked about voters who question the sincerity of his faith, Obama said: “I have a job to do as president, and that does not involve convincing folks that my faith in Jesus is legitimate and real.”

Mitt Romney, a devout Mormon, responded to the same question with a call for religious tolerance. Remarks by former Arkansas governor Mike Huckabee, a rival candidate for the 2008 Republican presidential nomination, were interpreted at the time as an attack on Romney’s faith, although Huckabee denied any such intention.

“I believe that Jesus Christ is the Son of God and the Savior of mankind,” Romney said in the interview. “Every religion has its own unique doctrines and history. These should not be bases for criticism but rather a test of our tolerance. Religious tolerance would be a shallow principle indeed if it were reserved only for faiths with which we agree.”

Obama cited his faith as one of the driving factors behind his health-care overhaul, which Romney has vowed to repeal if elected.

“We face big challenges in this country, and we’re coming to the point where we will decide if we’re truly in this together or if each individual ought to just fight for what serves them best,” he said.

“For me, and I think for many other Americans, faith tells us that there is something about this world that ties our interest to the welfare of a child that can’t get the health care they need, or a parent who can’t find work after the plant shut down, or a family going hungry.”

One answer by Romney, in response to a question about the candidates’ favorite scripture passages, seemed likely to raise eyebrows among Beltway insiders.

“I am always moved by the Lord’s words in Matthew,” Romney said. “ ‘For I was an hungred, and ye gave me meat. I was thirsty, and ye gave me drink. I was a stranger, and ye took me in. Naked, and ye clothed me....’ ”

The verse is from Matthew 25 — the biblical chapter selected as the name for a pro-Obama Christian political action committee, the Matthew 25 Network, founded during the 2008 presidential election campaign. The group, organized to counterbalance evangelical Christian support for Republicans in swing states, has said it aims to provide “a better Christian witness in politics.”

It spent $173,000 during the 2008 election cycle. To date, it has spent nothing for the 2012 election.