By Dan Gilgoff, CNN.com Religion Editor

Editor’s note: This is part of an occasional series of stories looking at the faith of the leading 2012 presidential candidates, including Mitt Romney, Rick Perry and Newt Gingrich. We also profiled the faith journey of Herman Cain before he suspended his campaign.

Austin, Texas (CNN) – Rick Perry’s new church is not like his old church.

At his new church, several hundred worshippers showed up in jeans on a recent Sunday to listen to high-decibel Christian rock from plush stadium-style seats.

The crowd, mostly under the age of 40, raised their hands to Jesus in between sips of freshly brewed coffee from the java hut in the lobby.

Outside Lake Hills Church – situated on 40 acres about half an hour’s drive from downtown Austin – a dozen sheriff’s deputies managed the Sunday morning traffic rush.

Back in town at Perry’s old church, a graying, neatly dressed crowd of several dozen gathered for services in a stately sanctuary, singing old hymns and reciting communal prayers from hard wooden pews.

There is no java hut at Tarrytown United Methodist Church – and not nearly enough traffic to justify sheriff’s deputies.

Perry’s jump from Tarrytown to Lake Hills mirrors some of the big recent changes in American Christianity: From cities to suburbs, from a formal mainline worship style that relies on liturgy to a more casual evangelical approach that’s all about connecting to Jesus.

The Republican presidential candidate’s 2007 church switch also may mirror something much more personal: The culmination of Perry’s journey from a mainline Protestant upbringing to an evangelical-flavored faith built on close relationships with Baptist preachers and giving public testimony about God.

How Mormonism helped shape Mitt Romney

Politically, his faith evolution creates an opportunity for Perry to connect with the evangelical voters who constitute the Republican Party’s base at a time when some say he’s the only candidate who stands any chance of derailing Mitt Romney’s bid for the GOP nomination, even as he has fallen behind Romney and Herman Cain in the polls.

The Texas governor has made his faith a centerpiece of his presidential campaign in ways both overt and subtle – hardly the first time he has enthusiastically mixed religion and politics.

At a time when Americans have grown accustomed to hearing public officials invoke a kind of generic national religion that’s sensitive to diverse faith traditions and nonbelievers alike, Perry has often gone a big step further, telegraphing a distinctly Christian message.

For instance, when Perry lent his signature to a Texas ballot initiative to constitutionally ban gay marriage – an effort that didn’t even require the governor’s endorsement – he did so on a Sunday from inside an evangelical Christian school.

Opinion: Why Perry needs Palin

And the four-term governor often speaks of a culture war between the nation’s Christians and secular humanists, who he says are trying to stamp religion out of the public square.

“America is going to be guided by some set of values - the question is going to be whose values,” Perry said in a speech at Virginia’s Liberty University in September. “I would suggest … it is those Christian values that this country was based upon.”

Now, as he wages an uphill battle for the Republican nomination, Perry is emphasizing his Christian commitment even more than in the past, trying to line up support from conservative Christian leaders and religious voters nationwide.

Some friends of the governor say he sees his presidential quest as a kind of mission from God.

Rick Perry talks to CNN's John King

“He said he didn’t want to do it, but he felt the Lord was calling him,” says Kelly Shackelford, who recently heard Perry discuss his campaign with religious activists.

“His wife and him were both reluctant,” says Shackelford, an influential conservative activist in Texas. “But as Christians, when you know you’re called to do something, there is no doubt, no hesitation. You just do it.”

“In those days, the churches were full”

Rick Perry grew up in tiny, isolated Paint Creek, an unincorporated farming community on the dusty plains of central Texas.

Paint Creek “was on a farm to market road where they had this Methodist church on one end and a Baptist church on the other and the school in the middle,” Perry’s wife, Anita Perry, told CNN.

For Rick Perry, “life revolved around school, church and – for most boys – the Boy Scouts,” he wrote in his 2008 book, “On My Honor.”

Paint Creek’s Baptists dominated local government and imposed a strict moral code, prohibiting school dances and Halloween carnivals, reasoning that carnival games were tantamount to gambling.

“The school board was nearly all Baptist, and they drew up a dress code every year that was very concerned with hair and short pants and exposing too much skin,” says Wallar Overton, a childhood friend and Perry’s neighbor in Paint Creek.

Overton’s parents, who were Methodists, once held a prom in their house to get around the school’s ban on dancing.

Bud Adkins, the current pastor at the community’s Baptist church, calls such bans “pretty characteristic. That’s how everyone in the area grew up.”

“A lot of parents just felt that dances were where bad things took place,” Adkins says. “Drinking and fighting and carousing and things you shouldn’t be doing.”

Perry said his family was active in both churches when he grew up in Paint Creek in the 1950s and ‘60s.

Perry’s campaign declined interview requests, but his religious friends say his early exposure to both Methodists and Baptists initiated him into the two main branches of American Protestantism – mainline and evangelical.

Mainline Methodists tend to stress good works, while evangelical Baptists focus on personal relationships with God.

“It’s a mix of looking out and looking in,” says David Barton, a Texas-based evangelical activist who has been close to the governor for 20 years. “And it’s why [Perry’s] comfortable in so many different settings, whether it’s a Catholic or a Hispanic or a black church.”

Perry has spoken in scores of Texas churches since becoming governor in 2000, including visits to black churches for Juneteenth, the annual holiday commemorating the arrival of news that President Lincoln's had ended slavery.

Perry’s ties to Texas’ black and Hispanic communities are largely built around faith-related issues such as abortion and gay marriage, on which polls show minorities tend to be more conservative than whites.

Though Perry attended the occasional Baptist revival in Paint Creek and appears to identify as an evangelical today, Overton says the governor was raised squarely in the Methodist church, attending Methodist services and Sunday school, taught by Overton’s mother, every week.

“Baptists taught doctrine,” Overton says. “My mom taught Christianity. ... Her God was a loving God.”

Years later, when Gov. Perry actively supported the death penalty and cuts in government programs for the poor - positions that clashed with the more progressive stances of the United Methodist Church - some fellow Methodists speculated that Paint Creek’s cultural conservatism shaped the governor more than his church did.

“This was a pretty good Bible Belt when we grew up,” says Adkins, who is a few years older than Perry and grew up in Rochester, about 30 miles away. “In those days, the churches were full and the parents were really conservative.”

Going evangelical

When Perry landed back in Paint Creek in the late 1970s, after college at Texas A&M and a four-year stint as an Air Force pilot, its small-town ways helped provoke an identity crisis for the future governor.

Then 27, Perry had been around the world flying huge C-130 cargo planes for the military. But in 1977, he found himself back on the family farm helping his dad.

After a lifetime of structure – Boy Scouts, the Corps of Cadets (a Texas A&M program similar to ROTC), the Air Force – Perry was adrift, struggling to find a path in the face of a wide-open future.

“I was lost, spiritually and emotionally, and I didn’t know how to fix it,” he told Liberty University students in his September appearance there.

Anita Perry, who was dating Perry at the time, said he “came home and all of a sudden he kind of had this world of independence.”

“He went to farm with his dad, who had been farming successfully for many, many years,” she says. “He didn’t really need Rick to come in and tell him how to do the farming.”

For someone who had served as an aircraft commander, the move home felt like a demotion.

“I came back into my old room. I swear to God I know mother cleaned it, but it looked exactly like it did the day I left,” Perry said at a May fundraising event for a Christian prayer rally he helped organize.

“It had my football number on the door, and it had the all-star football game program still stuck on the bulletin board,” he said. “It was an eerie moment for me to move back home.”

Perry says that he found resolution, while still 27, by turning to God.

“My faith journey is not the story of someone who turned to God because I wanted to,” he told students at Liberty, in what has become a mainstay of his speeches to Christian audiences. “It was because I had nowhere else to turn.

“I spent many a night pondering my purpose, talking to God, wondering what to do with this one life among the billions that were on the planet. What I learned as I wrestled with God is that I didn’t have to have all the answers, that they would be revealed to me in due time and that I needed to trust him.”

At other public appearances, Perry has said his soul-searching ended when he realized “I’d been called to the ministry.”

But that turned out to be a call to enter politics. “I’ve just always been really stunned by how big a pulpit I was going to have,” he said at the May fundraiser. “I truly believe with all my heart that God has put me in this place at this time to do his will.”

While being “born again” is considered an important milestone for many evangelicals, Perry isn’t known to describe his experience in 1977 Paint Creek in such terms.

As his wife puts it, “He’d already found Jesus because he had been baptized.”

“I don’t know really how to classify it,” she says of her husband’s experience. “I wasn’t in on that with him. … But I think he found the answer he needed.”

Church with the Bushes

Despite the evangelical overtones of Perry’s life-changing encounter with God, he and his wife joined a Methodist church when they landed in Austin in the mid-1980s, continuing his mainline childhood tradition.

Perry had been elected a state representative as a Democrat from a rural West Texas district in 1985. He was following in the political footsteps of his father, who was a county commissioner at the time.

In 1990, after switching to the Republican Party, Perry was elected agricultural commissioner, his first statewide office. Later, one of the capital’s other prominent families – the Bushes – joined the Perrys at Austin’s Tarrytown United Methodist Church.

George W. Bush was elected Texas governor in 1994, and he, Laura and their two daughters began attending Tarrytown.

By that time, Tarrytown had gained a reputation as a conservative alternative to Austin’s First United Methodist Church, which is right next door to the state Capitol and boasted high-profile Democratic attendees like Ann Richards, the governor of Texas from 1990 to 1994.

During the 1990s, the Perrys and Bushes were among the worshippers who made a tradition of distributing Holy Communion during Tarrytown’s Christmas Eve services. The Perrys also helped lead confirmation classes as their two children prepared to be confirmed in the church.

Perry was elected lieutenant governor of Texas in 1998, inheriting the governor’s office two years later when Bush left Austin for the White House.

Jim Mayfield, senior pastor at Tarrytown from 1988 to 2006, says the Perrys generally kept a low profile at the church.

“We weren’t close, but it was very cordial,” he says. “They attended worship, and that’s about all they did.”

At the same time, Perry was forming close relationships with evangelical pastors across the state.

“I’ve known the governor in a personal way for 20 years, since he was agricultural commissioner,” says Ed Young, a prominent Baptist preacher based in Houston. “I see God’s hand leading him and working in his life.

“He has grown in his faith,” says Young, who regularly talks and visits with Perry. “During crises, we look in every direction, and more and more the governor has looked up. Not in some pious God-told-me way, but in humility.”

In 2007, when the Perrys moved to a rented house in West Austin during a governor’s mansion renovation, Young encouraged them to check out an evangelical-style church a protégé had started nearby.

That congregation, Lake Hills, has been Perry’s church home ever since.

For some of Perry’s evangelical friends and supporters, his jump from a mainline to an evangelical church was a sign of spiritual growth.

“Lake Hills is a very strong church, and I’ve seen him get stronger in his faith,” says Shackelford, the conservative Texas activist. “Methodist churches are all over the spectrum. One could be really strong and conservative and the next one could be liberal.”

Anita Perry, meanwhile, says she misses her old church, Tarrytown.

“I miss those traditional hymns,” she told CNN during a recent campaign visit to Bob Jones University, a fundamentalist Christian school in South Carolina.

“The contemporary music [at Lake Hills], you know I hear it and I hear the beat. I hear the words, but I don’t know the words,” she says. “I didn’t grow up in that church; I grew in a traditional church.

“So that transformation for me was hard,” she says. “But I’m truly able to bring something back from the message [at Lake Hills] when I walk out of there.”

Pastors and presidential politics

In late 2004 as Election Day approached, polls showed the country about evenly divided between Perry’s political ally, President Bush, and Democratic challenger John Kerry.

Perry was worried. He headed to a dry creek bed somewhere outside Austin and called his friend James Robison, a Dallas-based televangelist.

“I’m out here in the middle of nowhere, a place so remote I'm surprised I get a cell signal,” Perry said, according to Robison. “I’m sitting down by myself, and I want to pray about the direction of the country.”

Robison had been friends with Presidents Reagan and Bush and had fielded many calls from Gov. Perry. The Baptist preacher said he was moved to learn his state’s chief executive was spending a day alone in the wilderness, praying.

For Robison, the call was “strictly spiritual.” But it could also be seen as evidence of Perry’s effortless fusion of faith and politics.

In Austin, Perry’s political fans and foes alike say that fusion is best reflected in his track record on abortion.

Since taking office in 2000, Perry has signed laws mandating parental consent for minor girls who want an abortion, slashing state funds for Planned Parenthood and requiring a woman seeking an abortion to first view a sonogram of her fetus. (A federal judge recently issued an injunction effectively blocking that law’s enforcement.)

Supporters say the record testifies to Perry’s faith-based commitment to life.

“He has passed 20-odd pieces of pro-life legislation,” Shackelford says. “He was vilified by the media for it, and he didn’t stand his ground [just] because it was a good policy position. It really all emanated from his faith.”

Critics say the governor has overstepped, compromising women’s basic health care in the name of ideology.

They note that state funding for Planned Parenthood was barred from going to abortions even before he cut it. And they say the sonogram law Perry signed requires doctors to read biased information to women seeking abortions.

“As governor of Texas, Rick Perry has pursued a single-minded agenda: Take away women's health care, destroy Planned Parenthood, and block women's access to safe abortion care,” the Planned Parenthood Action fund wrote in a recent petition drive.

More recently, Perry has become an outspoken advocate for religion in the public square and a vocal opponent of those who don’t believe in God.

“The life of the secular humanist has a depressing end,” Perry writes in “On My Honor.”

“All their possessions will be left behind, and the only thing that will matter is what God thinks of their life in the face of eternity.”

Elsewhere in the book, which tracks what Perry calls a secular war against the Boy Scouts, he characterizes evolution as an inherently atheistic idea.

“Even if one goes along with the atheists’ argument that life evolved from previous forms,” Perry writes, “where did the previous forms come from?”

Many scientists and believers would no doubt disagree with the governor. Polls show that tens of millions of Americans back evolution and also believe in God.

Perhaps Perry’s most audacious religious gesture as governor came in August, when he organized a prayer rally in the stadium where the NFL’s Houston Texans play. The event came a few months after Perry had proclaimed three days of prayer for rain in Texas amid the state’s long drought.

Robison, who helped launch the Christian Right in 1980 when he organized a meeting between then-candidate Reagan and pastors in Houston, says he approached Perry with the idea for the rally late last year to confront what Robison said was a national moral crisis.

“I simply said that we don’t seem to call for prayer anymore, and I referenced the biblical book of Joel, when he calls a solemn assembly after locusts had stripped the crops,” Robison says. “I said to the governor, ‘No one’s called a solemn assembly.’

“I was surprised when he called one,” Robison says. “There just are not many leaders who do that.”

The August prayer event, called “The Response,” was financed by the conservative evangelical American Family Association and was intended to acknowledge that, in Perry’s words, “America is in crisis.”

"We have been besieged by financial debt, terrorism and a multitude of natural disasters," Perry said in the run-up to the rally, which organizers said drew 30,000 people.

Billed as a “day of prayer and fasting,” it also involved dozens of conservative Christian leaders whose support is coveted by most of the Republican White House hopefuls.

But Perry's aides insisted The Response had nothing to do with presidential ambitious.

Aides say that calls for Perry to consider a White House run came only after other big-name Republicans, like Mike Huckabee, Mitch Daniels and Haley Barbour, announced they would not run. And that happened after Response planning was already well under way.

Skeptics argue that Perry, the longest-serving governor in Texas history, had to be at least pondering a White House run since late last year.

Either way, the prayer event created a major political opportunity for Perry. Intense media coverage allowed him to broadcast his Christian commitment to a national audience just one week before formally launching his presidential campaign.

Perry’s Christian messaging could be especially important because Romney, the perceived Republican frontrunner, is a Mormon. Many evangelicals don’t consider Mormons to be Christian, and flaunting his faith could be a way for Perry to distinguish himself.

Last month, a Baptist pastor who introduced Perry at a major conservative gathering stirred controversy by calling Mormonism a cult. Perry has said he disagrees.

Hours with the faithful

In the months since The Response, Perry’s courtship of national Christian leaders has intensified. With Romney locking up support from much of the Republican establishment, Perry is working overtime to shore up his party’s socially conservative base.

Just a few weeks after the Houston prayer rally, roughly 200 religious leaders from across the country, mostly evangelicals, descended on a San Antonio-area ranch for the chance to meet Perry and his wife.

Over the course of a Friday afternoon and a Saturday morning, Rick and Anita Perry talked up the governor’s record and took questions from the audience. James Dobson, founder of the evangelical group Focus on the Family, served as moderator.

Robison, one of the attendees, said the Perrys talked to them for six or seven hours.

“People who were there were stunned,” Robison said. “I’ve spent time with lots of candidates, and I’ve never seen one take that much time.”

Another attendee, Christian activist David Lane, said one audience member asked Anita Perry what people would be most surprised to learn about her husband.

“He’s more spiritual than you probably think,” Texas’ first lady responded, according to Lane. “He reads the Bible every day.”

For the Texas-based pastors and activists in attendance, that was hardly news. But to scores of others who were just getting to know Perry, it was reassuring information.

“As governor, people are not asking you, ‘Tell me when you came to the Lord,’” says Shackelford, who has known Perry for more than a decade. “The people you hang out with every day already know.

“But now he’s running for president,” Shackelford says, “and all of a sudden there are these Christian leaders meeting him for the first time, and they want to know: How did you come to know the Lord? What was your journey?”