State House News Service  reports  Massachusetts drivers will soon face fines for virtually all cellphone usage behind the wheel after Gov. Charlie Baker signed an anti-distracted driving bill into law Monday.

Starting in three months, motorists will be prohibited from using a handheld electronic device while driving except for a single touch or tap to activate hands-free mode. Voice commands will still be allowed, as will viewing a map on a device mounted to the windshield, dashboard or console, but all other uses are banned.

State law has forbidden texting while driving since 2010, but because other actions such as dialing a phone number were not covered, police have found it difficult to enforce and distracted driving has proliferated.

"When a driver on an electronic device hits something or someone, that's not an accident," Baker said during a crowded signing ceremony in the State House Library, joined by advocates and families of victims killed in collisions. "It's a crash that was avoidable, so this is a very proud day for Massachusetts where we join the other states in New England and do more to help prevent further injuries and horrible tragedies."

The law Baker signed Monday takes effect in 90 days — around Feb. 23 (officials did not have the specific date) — but law enforcement will only issue warnings for violations until March 31. Typing or receiving messages behind the wheel driving will still carry full punishments during that interim span.

Emergency use will be allowed, but drivers would need to prove that the circumstances — such as requiring medical aid or help with a disabled vehicle — warranted the actions.

Motorists will face fines of $100 for a first violation, $250 for a second violation and $500 for every violation after that. Second and subsequent offenses will require drivers to complete a training program, while third and subsequent violations will be surchargeable for insurance purposes.