After a back-and-forth struggle between the House and Senate over which bill would advance, the Legislature finally managed—with little time to spare—to send legislation to the governor that would decriminalize Texas’ punitive system for handling truant students. On Saturday, the House and Senate both signed off on House Bill 2398, by Rep. James White (R-Woodville), which would bring to an end Texas’ 20-year experiment with treating school absences as a criminal matter.

Under HB 2398, students who miss school would no longer face fines (unless found in contempt of a court order), arrest and even jail time. Instead, those who wrack up unexcused absences would be subject to truancy prevention programs, such as behavior modification plans or in-school community service. If that doesn’t work, school administrators can refer students to a truancy court, where the problem will be treated as a civil rather than criminal matter. The court could order students to counseling or tutoring.

“Truancy, like school discipline, is a schoolhouse issue primarily, and we want to provide our school districts with discretion and tools,” White said. “But at the same time we want to give them a floor of expectations.”

Texas is one of only two states to prosecute minors for truancy. “Failure to Attend School” is currently a Class C misdemeanor for which schoolchildren are prosecuted, punished and fined for cutting classes and missing school.

In a report released earlier this year, Texas Appleseed, an advocacy organization at the forefront of fighting for truancy reform, found that Texas filed approximately 115,000 truancy cases in 2013—more than twice the number of truancy cases, including civil ones, in all other states combined.

The report also found that there is little evidence to support the notion that most truant children are simply “skipping class.” Many youth have other pressing problems: taking care of a sick parent, homelessness, undiagnosed special education needs and bullying. Under HB 2398, students who are pregnant, foster children, homeless kids or students who are the principal income earners for their families can’t be sent to truancy court.

“We celebrate this monumental victory for Texas children and families across our state,” said Texas Appleseed Executive Director Deborah Fowler. “This bill makes great strides towards keeping students who are struggling with school attendance in school and on track to graduate.”

“This bill makes great strides towards keeping students who are struggling with school attendance in school and on track to graduate.”

Truancy reform seemed in jeopardy at many junctures late in the legislative session. A standoff between Sen. John Whitmire (D-Houston) and Rep. Harold Dutton (D-Houston) put the effort at risk after both chambers overwhelmingly signed off on competing bills.

However, widespread bipartisan support for truancy reform won out. HB 2398 was endorsed by the Texas Association of School Boards, the Texas Association of Business, the Juvenile Justice Association of Texas, the Texas Justices of the Peace and Constables Association and the Texas PTA.

“This has become a bipartisan issue. You see Republicans, Democrats, tea party, all fighting against truancy,” said Derek Cohen, policy analyst for the conservative Texas Public Policy Foundation. “They realize skipping school should not be handled in a criminal process.”

The bill now goes to Gov. Greg Abbott. In 2013, Gov. Rick Perry vetoed similar legislation.