TALLAHASSEE, Fla.—Florida Gov. Rick Scott signed a far-reaching school-safety bill Friday that places new restrictions on guns in the aftermath of a deadly school shooting, cementing his state’s break with the National Rifle Association. The NRA immediately fought back with a lawsuit.

The new law capped an extraordinary three weeks of lobbying that followed the shooting at Marjory Stoneman Douglas High School, with student survivors and grieving families working to persuade a Republican-run state government that had shunned gun control measures.

Surrounded by family members of the 17 people killed in the Valentine’s Day shooting, the GOP governor said the bill balances “our individual rights with need for public safety.”

Read more:

‘If he shoots, you need to play dead’: Frantic 911 calls from Parkland school shooting released[1]

Tony Montalto, whose daughter Gina was killed in the shooting, read a statement from victims’ families: “When it comes to preventing future acts of horrific school violence, this is the beginning of the journey. We have paid a terrible price for this progress.”

The bill fell short of achieving the ban on assault-style weapons sought by survivors. The gunman who opened fire at the school used such a weapon, an AR-15 rifle.

Nevertheless, the bill raises the minimum age to buy rifles from 18 to 21, extends a three-day waiting period for handgun purchases to include long guns and bans bump stocks, which allow guns to mimic fully automatic fire. It also creates a so-called guardian program enabling some teachers and other school employees to carry guns.

The NRA insisted that the measure “punishes law-abiding gun owners for the criminal acts of a deranged individual.” The group promptly filed a lawsuit to block the provision that raises the age to buy guns, arguing that it violates the Second Amendment.

The Parkland gunman “gave repeated warning signs that were ignored by federal and state officials. If we want to prevent future atrocities, we must look for solutions that keep guns out of the hands of those who are a danger to themselves or others, while protecting the rights of law-abiding Americans,” Chris W. Cox, executive director of the NRA’s Institute for Legislative Action, said in a statement.

The signing marked a major victory for the teens who lived through the attack and swiftly became the public faces of a renewed gun-control movement. Just days after the shooting, they began holding rallies, lobbying lawmakers and harnessing the power of social media in support of reform.

The governor told the students: “You helped change our state. You made a difference. You should be proud.”

Scott, who said he is an NRA member and will continue to be one, said he is still “not persuaded” about the guardian program that will let districts authorize staff members to carry handguns if they complete law enforcement training. It is not mandatory.

“If counties don’t want to do this, they can simply say no,” he said.

Andrew Pollack, whose daughter Meadow died, called the new law “a start

Read more from our friends at the NRA