In reality, many inmates worship God and practice their faith behind bars.

A recent 50-state survey of chaplains by the Pew Research Center's Forum on Religion & Public Life offered a rare look at the worshipers behind bars.

The study said state prisons hold the bulk of the country's convicts (1.4 million), but little has been released to the public on religion in these institutions.

Here are some of the major findings:

Chaplains in state prisons fulfill a range of functions.

Nearly all said they lead worship services, perform religious instruction, do spiritual counseling and organize religious programs. Fifty-seven percent considered the first three their most important functions, but only a third said this is where they spend most of their time.

The chaplains are overwhelmingly Christian (mainly Protestant), male and middle-aged. They also are well-educated, with 62 percent having advanced degrees.

And most like their jobs. Two-thirds said they were very satisfied, and only 6 percent were very or somewhat dissatisfied.

If there seems to be one essential, but challenging, aspect of most prison religion programs, it is in the area of rehabilitating inmates and preparing them for re-entry into society.

More than seven in 10 chaplains considered access to high-quality religion-related prison programs — and support from religious groups after inmates are released — to be “absolutely critical” to successful rehabilitation.

Of chaplains who work in prisons that have rehabilitation or re-entry programs, 57 percent said their quality has improved in the past three years, and 61 percent said participation has increased.

The study gives considerable attention to the topic of religious extremism in prisons.

The researchers explained: “Since the 9/11 terrorism attacks, religious extremism has been a topic of high public interest in the United States. Some experts specifically have raised concerns that prisons could be a breeding ground for home-grown terrorists and have suggested that prison chaplains and other prison administrators need to monitor religious activity more closely.”

Estimates of how common extreme religious views are tend to vary with the security level of the facility and the chaplain's background.

Protestant chaplains were more likely than Catholic or Muslim chaplains to say that religious extremism is either very or somewhat common, and the view was stronger among white evangelical Protestant chaplains than white mainline Protestants.

Nevertheless, 76 percent of chaplains said religious extremism rarely or almost never poses a security threat.

An open-ended question tried to assess what chaplains regarded as extreme. The answers were wide-ranging.

The most common reply was racism disguised as religious dogma, which included racial intolerance or prejudice. This went both ways, as both black and white inmates expressed racial superiority.

An almost equal number of chaplains said extremism included religious intolerance, such as expressions of religious superiority and attempts to coerce others into their beliefs.

A majority of chaplains said that attempts by inmates to convert other inmates are either very common (31 percent) or somewhat common (43 percent).

It doesn't always work, but the chaplains either said a lot of inmates change religions (26 percent) or some change religion (51 percent). Among those who reported at least some switching, about half said the number of Muslims is growing, followed closely by Protestant Christians and pagan and Earth-based religions.

The chaplains estimated that two-thirds of the inmates in the prisons where they worked were Christians and 5 percent to 9 percent were Muslim, followed by other groups. They said most religious groups have remained relatively stable in size but there was shrinkage of 20 percent among Catholics and 17 percent among the unaffiliated.

However, the researchers cautioned, “Chaplains' perspectives on the religious makeup of inmates may reflect a number of different influences, including their degree of exposure to various groups in the course of their work.”

Requests for religious accommodations, such as religious books or texts and meetings with leaders from inmates' faith, are most always granted. About half of the requests for specific religious diets and religious items or clothing usually are granted but special hairstyles or grooming is mostly denied.

Some chaplains regarded some requests as bogus or extreme, such as seeking raw meat for a Voodoo ritual, said one chaplain. Others said some so-called religious groups were a cover for nonreligious activities, such as gangs that claim to be religious and promote violence.