The National Rifle Association filed a lawsuit in federal court on Friday to block a new gun law in Florida just over an hour after it was signed by Republican Gov. Rick Scott, who is an NRA member.

The Marjory Stoneman Douglas High School Public Safety Act — passed three weeks after a mass shooting at the school killed 17 people — raises the minimum legal age for buying any guns in Florida from 18 to 21 and would allow some teachers and other staff in the Florida school system to be armed after training. SB 7026 also prohibits gun ownership by people mental health problems and expands the three-day waiting period that had applied only to handguns to now include long gun purchases.

An NRA spokeswoman said the suit was filed “against the state for violating the constitutional rights” of gun buyers under the age of 21, the Tallahassee Democrat reported.

“This blanket ban violates the fundamental rights of thousands of responsible, law-abiding Florida citizens and is thus invalid under the Second and Fourteenth Amendments,” the lawsuit states. “At 18 years of age, law-abiding citizens in this country are considered adults for almost all purposes and certainly for the purposes of the exercise of fundamental constitutional rights.”

The suit, filed in the Northern District of Florida, names Florida Attorney General Pam Bondi and Rick Swearingen, the commissioner of the Florida Department of Law Enforcement.

Earlier Friday, Scott hailed the “historic legislation” that would help ensure that “every student in Florida has the right to learn in a safe environment.” He was flanked by family members of the Parkland, Florida, shooting victims at the signing ceremony. Seventeen people were killed by a mass shooter at the Parkland high school on Feb. 14.

The new law also prohibits the sale and purchase of bump stocks, which boost the firing speed of semiautomatic weapons. The law’s controversial “guardian program” will allow some school employees and teachers to carry handguns with law enforcement training and if a school district agrees to participate in the program. While the NRA supports arming teachers, the Florida teachers union is opposed to the program.

The law also provides $67 million to develop the program for arming school personnel, as well as funds to make school buildings safer, hire additional school-based police officers and provide mental health services.

This article has been updated with more details on the Florida law.

Love HuffPost? Become a founding member of HuffPost Plus today.

This article originally appeared on HuffPost.