RALEIGH, N.C. (AP) — North Carolina legislation now heading to Gov. Roy Cooper would give harsher punishments for threatening mass violence at a school or place of worship, but also give extra help to accused young people.

The House and Senate voted overwhelmingly Thursday for a measure making such threats a felony. They are currently misdemeanors.

First-time offenders under age 20 could reach an agreement whereby a judge would dismiss a charge in exchange for community service, probation and mental evaluation and possible treatment. The case ultimately could be removed from their records.

Someone accused of making the threats could be held for 48 hours while a judge determines release conditions.

Sen. Tamara Barringer of Cary says the bill represents a chance to intervene before violence occurs and to keep schools safe.

Copyright 2018, The Associated Press. All rights reserved.