A Utah bill to keep young children out of detention centers and instead connect them with counseling and mental health help has cleared half of the Legislature.

The legislation sponsored by Rep. Craig Hall would generally block the prosecution of children of children younger than 12 and direct them into rehabilitation, keeping them engaged with their families and saving the state money by reducing the number of incarcerations.

“We know that youths in their minds and their brains are different than adults, so the system should be different than the adult system,” the West Valley City Republican told his colleagues Tuesday.

After his presentation, the Utah House passed the bill, HB262, by a vote of 48-23 and forwarded it to the Senate.

Rep. Merrill Nelson criticized the bill as potentially compromising public safety, raising a hypothetical about an 11-year-old boy who sexually abused a younger sister and asking whether prosecution would be off the table in this case. Hall said his bill provides some exceptions that allow prosecution for serious crimes, such as murder or aggravated sexual assault.

Not all sex crimes would be considered serious under the proposed changes. But even for offenses classified as less severe, the legislation leaves the prosecution path open if a child refuses rehabilitation, Hall said.

Still, Nelson argued, lockup is appropriate for certain children who present a risk to other people in their households and the community.

“Our kids at a younger and younger age are getting access to pornography,” the Grantsville Republican said. “Our kids are getting sexualized at a younger age, engaging in sexual conduct, sexual abuse at a younger age.”

In an interview following the vote, Hall noted that social workers would be involved with families in these situations to make sure a child who has committed an offense isn’t a danger to other kids.

Hall said 22 other states have set a minimum age for prosecution and others are moving in that direction. In Utah, 77 children younger than 12 were prosecuted in fiscal year 2018, he said, describing a situation in which a 5-year-old was taken to court for stealing a package from a neighbor’s porch.

An earlier version of the bill set the age minimum at 12 or younger, but Hall said he lowered it to 11 based on some concerns from prosecutors.