Amid a barrage of taunts from protesters calling him a "liar" and a "traitor," Vermont Gov. Phil Scott enacted the state's first major gun control measures during a signing ceremony at the Statehouse on Wednesday.

The package of bills raises the age to buy firearms from 18 to 21, bans high-capacity magazines, and makes it easier to take guns from people considered a danger to themselves or others and from people arrested or cited for domestic assault.

Under the new rules, people younger than 21 can buy a firearm only if they have completed a hunter safety course. The legislation also requires background checks for most private gun sales and bans rapid-fire devices known as bump stocks.

Scott, a first-term Republican, said the recent arrest of a former student allegedly planning a mass shooting at a Vermont high school, as well as the deadly massacre at a Florida high school in February that left 17 dead, spurred him to action.

But at several points, he had some trouble getting that message out.

"On Feb. 16, I was in my office — " Scott said, before a protester interrupted: "Smoking a joint?"

"— preparing for the day ahead, when everything changed," Scott continued, according to the Burlington Free Press. "That morning, I was handed a document containing charges against an 18-year-old outlining his detailed plan to carry out a school shooting here in Vermont."

PRO-GUN ACTIVISTS -- SOME TOTING AR-15'S -- SHOW UP IN FORCE IN VERMONT

Some in the crowd were supportive, carrying signs saying, "Thank You" and, "This is what courage looks like."

But many repeatedly interrupted Scott, according to local media.

"I thought, as the safest state in the nation, Vermont was immune to this type of violence. As I've said many times throughout my political life, public safety is the top priority of any government," Scott began. "It's a responsibility I take very seriously as governor."

Then came a pointed taunt amid the applause: "Unlike following the Constitution."

The new rules will take effect at various points this year, with some going into force immediately. Residents who had already purchased high-capacity magazines can keep them -- which had led to some stocking up on rifle magazines that hold more than 10 rounds and pistol magazines that hold more than 15, according to local reports.

Vermont’s constitution protects a person’s right to bear arms to defend themselves and the state, providing additional protection over and above the U.S. Constitution's provisions and associated case law. Gun rights groups in the state have vowed to challenge the new restrictions.

“I’ve been working on this issue for several years and wanted to come and thank Gov. Scott." — Gun control advocate Anna Niemiec

One gun store owner told the Free Press that Scott had "betrayed" his GOP base.

"I won't even root for him at Thunder Road," Mary Knapp said in an interview with the paper, referring to Scott's penchant for racing stock cars at a local speedway.

WILL SOUTH CAROLINA SECEDE FROM UNION IF GUN CONTROL PASSES?

Hundreds of gun rights activists gathered at a rally outside the Vermont Statehouse in March after the bills passed the House and Senate chambers, with some handing out nearly 1,200 high-capacity magazines.

On Wednesday, though, several who showed up at the Statehouse were optimistic.

“I’ve been working on this issue for several years and wanted to come and thank Gov. Scott for his courage and his soul-searching,” gun control advocate Anna Niemiec told the Free Press.

The Associated Press contributed to this report.