Massachusetts public school students would be banned from using or holding on to their cellphones during the school day starting next year, under a bill the state Senate passed 38-2 Thursday.

Targeting what Senate President Karen Spilka has called “the most distracting devices ever created,” the bill aims to curb students’ urge to scroll and check notifications during class — and to free up teachers’ time from policing phone use.

While many schools across the state already have policies limiting cellphone access in class, bill supporters say a statewide standard would make sure all students have the same support and face the same expectations.

In Framingham, educator Christine Mulroney said there’s a clear difference in classrooms now that cellphone restrictions are in place in her district.

“When phones are put away, everything changes,” Mulroney, president of the Framingham Teachers Association, said Wednesday at a State House press conference. “Students make eye contact. They engage in real conversations. They focus longer. They learn better. The classroom is more human again.”

The Senate’s bill would task school districts with adopting policies by the 2026-2027 school year that ban students from having personal electronic devices in their possession during the school day, including recess, lunch and the time between class. It leaves it up to the schools and districts to decide how to enforce the policy and how to store phones during the day.

Schools would still need to allow some way for students and parents to get in touch during the day, potentially by calling the main office. Exemptions would be allowed for students who need their phone or another device for an individualized education plan, for a disability accommodation or to help treat a health condition— for instance, to monitor their glucose levels.

Students often initially balk at the idea of cell phone limits, state Sen. John Velis said.

The Westfield Democrat said that when his office posted on social media about a phone-free schools proposal, one of his staffers “instantaneously” got a direct message from a middle-school student in their family “who shared their absolute outrage with the idea.”

That message, Velis said, was sent while the student was in class.

“Whenever I raise the idea of limiting time spent on their phone, I typically get a lot of pushback, but once we start to break it down — how they have trouble sleeping, how they’re not going to the gym as much, and how they’re distracted in school, the conversation happens,” said Velis, who co-chairs the Legislature’s mental health committee. “The conversation changes. And then something really interesting happens. When I raise the idea of everyone taking away time from their phones by restricting access during class, all of a sudden, the kids begin to acknowledge that this could be a great opportunity.”

Gov. Maura Healey has called for the Legislature to send her a bell-to-bell cellphone ban, and Attorney General Andrea Campbell also supports limiting cellphone use in schools.

It’s not clear, however, if and when the House will take up the Senate’s bill. House Speaker Ron Mariano, a former teacher, has not indicated if he’d like to pursue a ban as well.