BOSTON — A bill that would prohibit all use of hand-held cellphones by motorists in Massachusetts has moved forward on Beacon Hill.

The measure has been endorsed by the Legislature’s transportation committee and was given preliminary approval in the House on Wednesday without debate.

The legislation would require drivers to use a hands-free device when making or receiving non-emergency phone calls or using their cellphones for other purposes, such as accessing social media. Texting while driving is already illegal in Massachusetts.

The bill is by no means assured of passage. A similar measure was approved by the Senate during the last legislative session but never emerged for a final vote in the House.

The neighboring states of Connecticut, New Hampshire, New York and Vermont ban hand-held cellphone use by drivers.