For the third consecutive session, the Massachusetts Senate has approved legislation requiring hands-free use of all mobile devices while driving, but this time the House and Gov. Charlie Baker are on board too.

Senators voted unanimously 40-0 to approve the bill (S 2216), which bans the use of phones and similar technology behind the wheel save for a single tap or swipe to enable a hands-free mode. They had passed similar legislation passed twice before, but those bills died in the House.

The House approved its own version of similar legislation 155-2 last month. The two bills have some differences, most significantly regarding collection of racial and ethnic data at traffic stops to track for bias, that leaders will need to reconcile in order to move a bill to the governor's desk.

After Thursday's session, Senate President Karen Spilka said she is optimistic that her branch can work out a final version with House leadership "pretty quickly" and that, whenever legislation lands on Baker's desk, it will be "a very good day for the commonwealth."

The governor himself included hands-free language in a road-safety bill he filed this session, and he said earlier this year that action is needed promptly. "It's pretty clear that distracted driving and some tragedies and some near misses on construction sites are indicators that it's probably time to simply stop debating some of these common sense initiatives and just get them done," Baker said.

"After fifteen years of filing and tirelessly pushing legislation to ban such dangerous
behavior, Beacon Hill is finally ready to end the tragedies occurring on our roadways," bill sponsor Sen. Mark Montigny of New Bedford, who has been pushing similar legislation since 2004, said in a statement. "Today, the Senate again passed a strong bill to save lives. We can never truly understand the pain suffered by the families of distracted driving victims, but we certainly owe it to them to put this on the Governor’s desk ASAP."

Under a state law enacted in 2010, drivers are banned from sending or receiving text messages and emails, but many drivers continue to use their phones while driving. Lawmakers and advocates have pushed for years to extend restrictions to phone calls, various apps and internet browsing. Current restrictions, they said, are difficult to enforce because it can be challenging for police to prove drivers were texting rather than using devices in some other capacity not covered by the current regulations.

"With the development and availability of new technology, particularly smartphones, it has presented a tempting distraction behind the wheel," Sen. Joseph Boncore, chairman of the Joint Committee on Transportation, said during floor remarks. "With distracted driving comes an increased risk and greater danger to motorists, cyclists and pedestrians on our roadway."

The Senate bill would ban virtually any handheld use of smartphones or other devices, allowing drivers to make only one tap or swipe to activate or deactivate a hands-free mode or to launch GPS directions.

Those who violate the new law would be fined $100 for a first offense, $250 for a second offense and $500 for third and subsequent offenses, which would also count as surchargeable penalties for insurance purposes.

The measures do not apply to first-responders who are working emergency cases.

Both branches included language requiring police to collect demographic data on traffic stops and to produce annual reports summarizing the figures. That information, supporters said, is crucial to monitoring for racial profiling.

"The problem is that there is not a person in America who doesn't carry around racial and ethnic prejudices in their minds," said Sen. Sonia Chang-Diaz during debate. "Not me, not anyone in this chamber, no one. Policing is deeply important work, and we entrust officers with huge responsibility and authority. It's important we have systems in place to ensure that work is carried out without bias."

The Massachusetts Chiefs of Police Association and other advocacy groups who are interested in the topic will be consulted in "ancillary" conversations that lawmakers will weigh as they consider a final bill, Boncore said.

The House and Senate bills differ on exactly what data should be gathered: the House bill would count all stops that result in a driver being issued a citation, while the Senate's would track all stops altogether regardless of outcome.

House members have expressed concerns that recording every stop is not feasible, but Boncore said he believes law enforcement can find a solution in existing technology.

"This bill is so important as a public safety issue," he told reporters after the bill's passage. "It's become an epidemic on our roads, distracted driving, that we can't let anything get in the way of the good policy that's in this bill. I'm sure the House feels the same way, that we'll have to come together to get consensus."

For Montigny, who highlighted families who lost loved ones to distracted-driving crashes during a speech on the Senate floor, the law is already long overdue.

"I'm sad to report that the only thing that's happened since the last time we took this bill up and passed it in the Senate is more people have died and more people have been injured and more resources have been lost," he said.