Lawmakers in Vermont, a place long steeped in hunting culture, on Friday approved a sweeping package of new gun restrictions, making the state all but certain to join Florida in passing a raft of new gun control measures after a teenage gunman killed 17 people last month at a high school in Parkland, Fla.

Gov. Phil Scott, a Republican, has vowed to sign the measure. It represents a remarkable departure from the state’s existing gun laws, which are some of the weakest in the country — and an about-face for Mr. Scott, who decided to consider new gun control measures only after a teenager was accused of plotting a school shooting in Vermont in the days after the violence in Parkland.

“No state is immune to the risk of extreme violence,” Mr. Scott said in a statement on Friday, adding, “If we are at a point when our kids are afraid to go to school and parents are afraid to put their kids on a bus, who are we?”

The bill, which passed the Senate, 17 to 13, on Friday after clearing the House earlier in the week, would raise the minimum age to purchase a gun to 21 and ban bump stocks, which are devices that allow semiautomatic rifles to fire more rapidly. It also contains restrictions that go beyond those in the measure signed in Florida, like an expansion of background checks and a limit on the capacity of magazines that can be sold or possessed in the state.