INDIANAPOLIS — When Boone County law enforcement officials sent a letter telling registered sex offenders they couldn’t go to church where there were children’s programs, three of the letter recipients filed a lawsuit

The men claimed they couldn’t exercise their religion for fear of being arrested. They won their case with the Indiana Court of Appeals.

Now, a state senator is trying to set a time limit under which sex offenders can attend churches when children are present.

Sen. Frank Mrvan, D-Hammond, has authored legislation that would allow a serious sex offender to be at a religious institution, when it is located on school property, not earlier than 30 minutes before worship service begins or 30 minutes after it ends.

Mrvan said his Senate Bill 295 was aimed at keeping children safe: “It’s our responsibility to protect children.”

During a Senate Corrections and Criminal Law committee meeting this week, Sen. Michael Young, R-Indianapolis, who chairs the committee, explained, “What Sen. Mrvan’s bill is attempting to do is restrict those convicted sex offenders to certain times for services so their Constitutional rights are protected and so are the kids at the same time.”

On Tuesday, the bill passed 7-2 from committee and will head to the Senate floor.

However under questioning, neither Mrvan nor supporters could say how the law might affect an offender attending an adult Sunday school class held outside the 30-minute window.

A representative from the Indiana Department of Education asked that the 30-minute limits be extended to include school events. The department also wanted school corporations to not be held liable from any damages if a church allowed a sex offender to attend worship.

According to court documents in the Boone County case, pastors or staffers at two of the men’s churches knew of the sex offense convictions; a member of the ministry at the third man’s church knew of the convictions. All three churches had programming for children.

The July 2015 letter from the Boone County Sheriff’s office was based on Indiana law that prohibits “serious sex offenders” from being on school property.

The letter said the sex offenders could not attend church, without facing arrest, if the church conducted Sunday school or had child care.

The appellate court rejected the notion that the three offenders’ churches were “school property” and ruled in favor of the men attending church services.