Montpelier — A bill that makes sweeping changes to the state’s gun laws, including expanding federal background checks to the private sale of firearms, has gained preliminary approval in the House after a debate that started in the morning and stretched into the evening.

The gun restrictions contained in the legislation had little chance of making it to the House floor at the start of the legislative session in January, but moved to the forefront following a mass school shooting in Florida and a foiled plot of a school attack in Vermont, both last month.

The House voted, 85-59, to approve the bill, S.55, which expands background checks to private firearms sales, prohibits those under 21 from purchasing a firearm, and bans high-capacity magazines that can hold more than 10 rounds of ammunition and bump stocks, a device that modifies semi-automatic rifles to increase the firing rate.

Debate on the legislation started a little after 9:30 a.m. on Friday and drew to a close a little before 7:30 p.m., with a 30-minute break for lunch.

Seats in the balcony and along the House floor were nearly full when the debate started in the morning, with many gun rights supporters in the crowd sporting blaze-orange clothing.

About 10 hours later, when the legislation gained preliminary approval, only a few onlookers remained.

Third reading, which will include a final vote on the legislation, is set for Tuesday, and additional amendments are expected.

“The policies in this bill will help keep firearms away from those who intend harm and will reduce the lethality of firearms that may be misused,” Rep, Martin LaLonde, D-South Burlington and a member of the House Judiciary Committee, said on the floor in introducing the legislation.

“Recent events in Las Vegas, and Florida and closer to home in Fair Haven, Vt.,” he added, “underscore the threat to public safety when those who intend harm possess firearms.”

Rep. Paul Poirier, I-Barre, said right before the final roll call on the overall bill that the far-reaching changes on gun laws in Vermont represent a “culture shock.”

“I personally believe that this is a lot of feel good,” he said of the legislation before voting against it.

Rep. Mike Mrowicki, D-Putney, saw it a different way.

“There’s a sea change happening in this country,” he said, “and the young people are leading the way.”

Rep. Patrick Brennan, R-Colchester, talked of his opposition to the legislation. “I can’t agree with anything we did here today,” he said. “We did a great disservice to Vermonters.”

“Time will tell how many of us will be back,” Brennan said.

Gov. Phil Scott, at his news conference this week, indicated he’d support S.55.

The governor, who told reporters last month he was jolted by reading an affidavit in what police describe as a thwarted attack by an 18-year-old on his former high school in Fair Haven, Vt., said when it comes to gun legislation, “everything’s on the table.”

S.55 narrowly advanced to the full House floor for consideration earlier this week on a 6-5 vote in the House Judiciary Committee, mostly split along party lines. Rep. Chip Conquest, D-Wells River, was the lone Democrat who joined the panel’s four Republicans in opposing the measure.

The vote on the House floor on Friday evening also split mainly along party lines.

The Senate passed a pared-down version of the bill earlier this month. That bill contained the provisions for wider use of background checks and raising the age to buy a firearm in the state.

The House bill will now be sent back to the Senate to see if that body concurs with the changes. If not, a conference committee would be established with representation from both bodies.

The bill, S.55, initially had aimed at setting up a process for police to dispose of guns stored by the state, before it became the vehicle for major new gun restrictions.

The Senate added the wider background provision and increasing the age requirement for the purchase of a firearm. In the House Judiciary Committee, other measures were added, including the ban on high-capacity magazines and bump stocks.

The bill, as passed by the House on Friday, expands a federal background check for the private sale, trade, or gifting, of a firearm in the state. Exemptions would be made for military members, those in law enforcements and transfers of firearms among immediate family.

It also increases the legal age to buy a firearm in Vermont to 21, with exemptions for law enforcement officers, military members, veterans and those who has completed a Vermont hunter safety course, or another approved firearm safety course.

On S.55, the House cast votes Friday on separate parts of the bill before a final vote on the overall legislation.

The majority of Upper Valley representatives supported all of those amendments to the bill. Bob Frenier, R-Chelsea, was the only one who voted down all of the measures. He and state Rep. Rodney Graham, R-Williamstown, were the only Upper Valley lawmaker not to support a ban on bump stocks.

Susan Buckholz, D-White River Junction and Benjamin Jickling, I-Randolph, both voted no on three of the four amendments: expanding background checks, magazine limits and increasing the age to purchase a firearm to 21.

Philip Jay Hooper, D-Randolph, split his vote by supporting a ban on bump stocks and raising the age limit, and voted no on the other two amendments.

Jim Harrison, R-Chittenden, whose district includes Bridgewater, voted against expanding background checks for private guns sales and against a ban on high-capacity magazines.

Robert Forguites, D-Springfield, and Charlie Kimbell, D-Woodstock, both supported all of the measures aside from raising the age to buy a firearm.

David Ainsworth, R-South Royalton, was absent.

The Valley News contributed to this report.

Correction

State Rep. Rodney Graham, a Williamstown Republican whose Orange 1 district includes the Upper Valley towns of Chelsea, Vershire and Corinth, voted against a ban on bump stocks and was absent for some other votes on a gun bill in the Vermont House on Friday. Rep. Jim Harrison, R-Chittenden, whose district includes Bridgewater, voted against expanding background checks for private guns sales and against a ban on high-capacity magazines. They were inadvertently omitted from an earlier version of this story.