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: 800 Migrant Children Housed In Long Beach Convention Center Reunited With Family

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

READ MORE: George Clooney, Eva Longoria Help Launch LAUSD's Entertainment Business Magnet School

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: Spike In Demand, Staffing Issues Forces American Airlines To Cancel Hundreds Of Flights

(Β© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)