Massachusetts Sen. Joseph Boncore, a Winthrop Democrat, said that using a cellphone while driving at 55 miles per hour is equivalent to making that trip across the length of a football field while wearing a blindfold.

State senators took one step closer to getting rid of that blindfold on Thursday when they unanimously passed a bill banning handheld cellphone use while driving.

“Distracted driving has become an epidemic on our roadways, particularly smart phones. It has presented a tempting distraction behind the wheel," Boncore said Thursday before the vote.

“We and this body have a duty to increase safety on our roadways in the commonwealth,” he added. “As is such, we must do everything in our collective power to stop this behavior.”

The Senate has approved the measure in previous sessions, but the House approved a similar bill last month — a first for the handheld cellphone ban legislation.

Nineteen states have passed laws banning handheld cellphone use while driving, including New Hampshire, Rhode Island and Vermont. Some states are rolling out the laws gradually. Drivers in Arizona who are caught violating this law are supposed to receive a warning until Jan. 1, 2021, according to the National Conference of Station Legislatures.

The House passed its version of the bill on May 15, 155-2. House Speaker Robert DeLeo, a Winthrop Democrat, said at the time that he felt that motorists have been negatively affected by the use of cellphones while driving.

“Many people have either had personal experiences or constituents in their area who have had some real serious accidents, some ending unfortunately in death,” he said.

Boncore said at Thursday’s Senate session that distracted driving accidents have spiked more than 170 percent in the commonwealth and that nearly 30 percent of drivers have admitted to using the internet or social media while driving their car.

Now that the bills cleared both the House and Senate, state lawmakers have to reconcile the differences in their versions of the legislation and vote on the changes before it can head to Gov. Charlie Baker’s desk.

Both the Senate and House bills require that people violating the ban pay fines of $100, $250 and $500, depending on whether it’s their first, second or third offense.

One key difference in the bills is how the state would compile data to address concerns about racial profiling in traffic stops. The Senate would require that law enforcement gather information about every stop. The House bill would only require racial data to be gathered when a traffic stop results in a citation.

“The point of this is to make sure stops are not being done in a discriminatory way,” said Sen. Cynthia Creem, a Boston Democrat.

The legislation is an effort more than 15 years in the making says Sen. Mark Montigny. A New Bedford Democrat, he says he proposed similar bans as early as 2003 but was met with criticism. That was before smartphones and before people routinely posted on social media while driving. It also came before auto companies implemented technology to pair a phone to a vehicle so a driver can look for directions, make calls and get notifications while driving.

Massachusetts passed a ban on texting while driving in 2010, but nowadays motorists are seen checking their emails, scrolling through their Facebook news feed and and tweeting while driving. Law enforcement officials said the 2010 law quickly became outdated as smartphone technology advanced.

The cellphone ban legislation has been passed in the Senate since then, but it did not move forward.

“I’m sad to report that the only thing that has happened since the last time we took this bill up and passed it in the Senate is more people have died and more resources have been lost,” Montigny said.

Montigny said on Thursday that while there may be some differences between the House and Senate versions that have to be addressed in a conference, he laments most that the bill wasn’t passed sooner.

“It would have been great to do it nine years ago or eight years ago or seven years ago or at least in the last two sessions,” he added.