North Carolina is a proud member of the so-called Bible Belt of states that take their religion seriously. So some eyebrows were raised when James Nichols was arrested for attending church.

His offense? Nichols, a convicted sex offender, had chosen to worship at a church that has a nursery where kids play while their parents pray. Now Nichols, 31, who only recently got out of prison, is fighting back, challenging the legality of a new law that took effect in December prohibiting registered sex offenders from coming within 300 ft.  nearly a football field's length  of any facility devoted to the use, care or supervision of minors. (See pictures of John 3:16 in pop culture.)

As more states have adopted laws regulating where sex offenders can go, it was only a matter of time before the noble goal of protecting children butted heads with the sacrosanct First Amendment right to worship where and when you choose. Which takes precedence?

"This law makes it illegal to do things that are not wrong, like go to church," says Glen Gerding, Nichols' attorney. "When does the state stop interfering with a church's business? Will pastors be charged as an accessory for letting a known sex offender sit in a front-row pew and worship?"

Most states restrict sex offenders' movements in some way; North Carolina's law is hardly the strictest. In Georgia, registered sex offenders can't live or work within 1,000 ft. of places including schools, churches and child-care centers. Courts there have waded into questions of religion, ruling in favor of the right of offenders to partake in activities including volunteering in a church kitchen, attending adult Sunday School and singing in a church choir. (See pictures of a drive-in church.)

On behalf of Georgia's 16,000 registered sex offenders, the Atlanta-based Southern Center for Human Rights has sued the state over its residency and employment restrictions, including the ban on faith-based volunteering.
"There are serious constitutional problems in banning someone from going to church, not to mention this runs counter to the church's mission of inclusion, hospitality and redemption," says Sara Totonchi, the center's associate director.

As soon as North Carolina's law went into effect in December, Katy Parker, legal director for the state's American Civil Liberties Union (ACLU) chapter, started fielding calls. Offenders wanted to know if the law prevented them from going to church; pastors worried it would keep worshippers away.

Parker says the law was so vague that she couldn't offer advice, but she did put out the word to defense attorneys that should they wind up representing someone accused of breaking the law, the ACLU wanted to hear about it. Nichols' March apprehension is one of two religion-based arrests that Parker is aware of. (See pictures of spiritual healing around the world.)

"It's unbelievable that the N.C. state legislature and the people of North Carolina would not want someone to go to church for spiritual reasons and for rehabilitative reasons," says Parker.

But others think the ACLU is missing the point. The premise of the law is sound, says Laurence Tribe, a constitutional-law expert at Harvard. "If the moment you enter a church you don a cloak of immunity from the rule of law, then churches would become sanctuaries for crime," says Tribe. (Read "The Vatican Rethinks Laws on Abuse.")

Nichols, who was convicted of indecent liberties with a teenage girl (he was 20 at the time) and attempted second-degree rape, had prayed at Moncure Baptist Church in Moncure, N.C., where he was living, for several months before the police paid attention. Oddly enough, Nichols inadvertently outed himself, calling the cops about a fellow congregant  another offender  whom he witnessed fondling a 12-year-old girl. "I thought I was doing the right thing, and they hit me with charges," he says.

But he wasn't about to give up on God. Nichols credits religion with keeping him out of trouble. He had attended church sporadically before he went to prison; now he goes twice a day and three times on Sundays. "Church helps me to not live my old ways," says Nichols, who currently attends New Life Mission Church in Fayetteville, N.C., a hard-knock place that caters to ex-cons, former drug dealers and alcoholics.

Pastor Grace Kim welcomed Nichols to her church, which has no nursery on site and no children who attend the twice-daily services. "We want to try to give everyone a chance to rehabilitate, no matter their background." (See the top 10 religion stories of 2008.)

Only time  and judges' decisions  will determine whether the new law bars offenders from attending any church (where children might attend) or just those with child-care facilities. What is clear is that those who hammered out the small print of the legislation are sticking by it.

David Hoyle, the state senator who sponsored the bill, says it took two years to pass, partly because legal advisers took care to word it to withstand legal challenges.

The law is named for Jessica Lunsford, the Florida girl who was kidnapped and killed in 2005 by a convicted sex offender. Lunsford was born in Hoyle's district and attended school in the tiny town of Dallas, where Hoyle lives. He still talks to her father regularly; her cousin will serve as a senate page for Hoyle next year.

"I got e-mails calling me the anti-Christ and saying I'm going to hell, but we want to make the law just as strong as we can," says Hoyle. "We feel it is a good law. When a person takes advantage of a child, I don't worry about their constitutional rights."