MONTPELIER, Vermont — The Vermont House gave final approval to a package of gun ownership restrictions Tuesday night while opponents clad in orange hunting vests packed the State House.

Lawmakers voted 89-54 to pass legislation that would raise the legal age for gun purchases, expand background checks for private gun sales and ban high-capacity magazines and rapid-fire devices known as bump stocks. The vote fell primarily along party lines.

Gun control opponents argued that the measure was unconstitutional and would do nothing to protect schoolchildren.

The demonstration came three days after an estimated 2,500 students and supporters held a rally outside the State House in support of gun safety measures.

Speaking at a State House news conference, Republican Gov. Phil Scott said he understood that he has disappointed many of his supporters with his stance backing some form of gun restrictions but realized he had an obligation to do something after a teenager was arrested last month for plotting to shoot up the Fair Haven Union High School.

“It’s a tremendous responsibility as governor to make sure that you protect the citizens of the state so this isn’t an easy decision for me to make, but I have to look at it broadly and ask myself, do some soul searching and ask myself … are we doing everything we can to protect our kids, and the answer for me at that point in time was no,” Scott said.

[Kansas considers making schools liable for not arming staff]

The opponents were not swayed. They argued the proposals were unconstitutional and would not accomplish the goal of school safety.

One of the opponents, Hardwick police Chief Aaron Cochran, went to the State House on Tuesday in uniform, representing the group Vermont Law Enforcement Against Gun Control.

“Our focus as law enforcement is on school safety,” Cochran said. “And, unfortunately, a lot of effort has been taken away from school safety and gone into this gun control debate.”

The measure, which was given preliminary approval Friday, now has to be reconciled with a version of it that was first passed by the Senate.

Separately, Vermont lawmakers this week are expected to give final approval to legislation that would make it easier to take guns from suicidal people and perpetrators of domestic violence.

While nationwide the push for gun ownership restrictions was given a boost by the shooting last month at a Parkland, Florida, high school that killed 17, the Vermont debate was spurred by what officials described as a near-miss in Fair Haven. In that case, a friend of the teenager accused of plotting a shooting told police about him and he was arrested.

The case prompted Scott to call for gun restrictions.

Associated Press writer Lisa Rathke contributed to this report.

Follow the Bangor Daily News on Facebook for the latest Maine news.