TALLAHASSEE, Fla. (AP) — The National Rifle Association has filed a federal lawsuit over gun control legislation Florida Gov. Rick Scott has signed, saying it violates the Second Amendment by raising the age to buy guns from 18 to 21.

The lawsuit came just hours after Gov. Scott, a Republican, signed the compromise bill Friday afternoon.

READ MORE: Drag Racing On Temple University's Campus Turns Violent, Police Say

Lawyers for the NRA want a federal judge to block the new age restriction from taking effect.

READ MORE: 2 Teens Injured In West Philadelphia Shooting, Vehicles, Apartment, Struck By Gunfire, Police Say

The new legislation 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 that allow guns to mimic fully automatic fire. It also creates a so-called “guardian” program that enables teachers and other school employees to carry handguns.

The new measures come in the wake of the Feb. 14 shooting rampage at Marjory Stoneman Douglas High School in Parkland, Florida, that killed 17 people.

MORE NEWS: Segura 2 HRs, Nola Sharp, Phillies Beat Mets, Win 4th In Row

(Copyright 2018 by The Associated Press. All Rights Reserved.)