(CNN) Florida Gov. Rick Scott signed Senate Bill 7026 into law Friday, the first gun control legislation enacted in the state after the Parkland school massacre on February 14.
The law, known as the Marjory Stoneman Douglas High School Public Safety Act, tightens gun control in several ways but also allows some teachers to be armed.
Scott, surrounded by families of the victims, recounted the grief visited on his state in the aftermath of the Valentine's Day carnage at Marjory Stoneman Douglas in Parkland and, in 2016, the shootings at Pulse nightclub in Orlando and Fort Lauderdale Airport.
"The hardest thing I've ever had to do as governor is try to find the words to console a parent who has lost their child," Scott said. "There are just no words."
One provision of the law raises the minimum age to purchase a firearm to 21 from 18.
The National Rifle Association immediately filed a federal lawsuit against Florida, saying the age-minimum section of the law violates the second and 14th amendments of the US Constitution.
The NRA argues people who are 18 years old are considered adults "for almost all purposes and certainly for the purposes of the exercise of fundamental constitutional rights." The organization also contends federal law already prevents many Americans 21 or younger from buying certain types of guns.
Scott received the $400 million bill Thursday following days of impassioned, often contentious debate in the majority-Republican House and Senate. He praised the Legislature, contrasting its quick action with what he called the inefficiency of the federal government in Washington.
A controversial part of the new law is known as the Coach Aaron Feis Guardian Program, which arms some teachers if both the local school district and local sheriff's department agree. The $67 million provision is named after the coach who shielded students with his own body and died in last month's shooting.
The governor, who met with victims' families in Tallahassee before his announcement, expressed reservations about the provision but said local officials would decide whether to enact it.
"I still think law enforcement officers should be the ones who protect our schools," he said.
"I've heard all the arguments for teachers to be armed and, while this bill would significantly change on this topic, I'm still not persuaded. I'm glad, however, the plan is not mandatory, which means it be up to local elected officials."
Counties opting out of the provision to arms teachers could redirect those funds to hire more school officers, Scott said.
"To the students of Marjory Stoneman Douglas High School, you made your voices heard," Scott said. "You didn't let up and you fought until there was change."
After the bill signing, United Airlines captain Tony Montalto, whose daughter, Gina Rose, died in the school shooting, read a statement on behalf of the victims' families.
"When it comes to preventing future acts of horrific school violence, this is beginning of the journey," the statement said. "We have paid a terrible price for this progress. We call on more states, to follow Florida's lead, and create meaningful legislation to make all schools safer."
The appropriation includes more than $69 million for mental health assistance in schools, more than $25 million for replacing a building at Marjory Stoneman Douglas and $98 million for hardening security of school buildings.
Other provisions of the law include banning the sale or possession of bump fire stocks, giving law enforcement greater power to seize weapons and ammunition from those deemed mentally unfit, and additional funding for armed school resource officers.
The rampage by a former student with mental health issues and armed with an AR-15-style rifle left 17 students and teachers dead at the Parkland high school near Fort Lauderdale. It also revived a contentious national debate on gun control.
From Arizona to Washington, young people walked out of schools in support of Marjory Stoneman Douglas High survivors who mobilized behind an emotional movement calling for a ban on weapons such as the one used to kill their friends and teachers.
For some shooting survivors who demanded an assault weapons ban, the measure didn't go far enough.
But it went too far for some Republican lawmakers opposing stricter measures on gun ownership.
Scott had 15 days to sign the bill into law or veto it. If he did nothing after 15 days, it automatically became law.
Under caveats to the "guardian" program, teachers who "exclusively perform classroom duties as classroom teachers" won't be allowed to carry guns on campus, unless they have military or law enforcement experience or if they teach a Junior Reserve Officers' Training Corps program. The program is voluntary, and qualified staff members who want to carry a gun must take 144 hours of training.
The state teachers union urged Scott in a letter Thursday to use his line-item power to veto funding for the Guardian program.
Sharon Nesvig, the communications director for the Florida Education Association, said the group was very disappointed with the governor.
"If guns (on campuses) are the appropriate answer, then we owe it to our children to provide appropriate numbers of professionally trained law enforcement personnel, such as school resource officers, school safety officers and local police whose work assignment is to protect students and staff at the school," Nesvig said.
Scott said a line-item veto of the provision would have eliminated funds available for the hiring additional school officers this year.
The bill has been an important political consideration for Scott, who is facing term limits as governor and is widely expected to challenge Florida's Democratic US senator, Bill Nelson, in November's midterm election.