Massachusetts is on its way to becoming the first state since the Las Vegas shooting massacre to outlaw devices that allow semi-automatic weapons to mimic fully automatic guns.

The state Senate voted 33-0 on Thursday to ban the sale of bump stocks and trigger cranks, attachments that increase the firing rate of a weapon. A day earlier the state House voted 151-3 in favor of a bump stock ban.

The two versions must be reconciled before a final bill is sent to Republican Gov. Charlie Baker, who has said he would sign a ban if it reaches his desk.

A bump stock fits over the stock and grip of a semi-automatic rifle and allows the weapon to fire continuously. The Las Vegas shooter, who fired upon a country music concert crowd from his 32nd-floor hotel room and killed dozens of people, had 12 weapons fitted with such devices.

The Senate bill would classify bump stocks and trigger cranks under the same state laws restricting machine guns. The bill would set a penalty of 18 months to life in prison for the illegal use and possession of bump stocks and trigger cranks.

Democratic Senate President Stan Rosenberg said there's "no legitimate purpose for the use, sale and possession of these devices other than to cause as much damage as possible."

Republican Senate Minority Leader Bruce Tarr said the Senate bill would mean that "those who are not appropriately licensed to possess devices that are in effect approximating a machine gun will be in violation" of the law.

The House version of the bill says that anyone who "possesses, owns or offers for sale any device which attaches to a rifle, shotgun or firearm, except a magazine, that is designed to increase the rate of discharge ... or whoever modifies any rifle, shotgun or firearm with the intent to increase its rate of discharge" will face between three and 20 years in prison.

Democratic House Speaker Robert DeLeo defended the decision to vote on the bill without holding public hearings first, saying the state has a long history of taking action to prevent gun violence.

"I think it's important for us to take it up and take it up immediately," DeLeo said Wednesday before the House vote.

The executive director of the Gun Owners Action League of Massachusetts, Jim Wallace, has faulted lawmakers for rushing to ban the devices, calling it premature.

The National Rifle Association, of which the Gun Owners Action League is an affiliate, has suggested that the Federal Bureau of Alcohol, Tobacco, Firearms and Explosives should revisit the devices and determine if they should be subject to greater restrictions.

Wallace said rushing a bill through "without taking the time to figure out what's going on is kind of irresponsible."

"They don't even know what the ATF's going to do yet," Wallace said before the House vote Wednesday. "The investigation hasn't been finished. The ATF may take this up and may change everything."