A law passed in Florida in the wake of the Parkland school shooting that requires individuals to be at least 21 years old to purchase firearms was upheld by a federal appeals court on Thursday. 

The Florida legislature passed the Marjory Stoneman Douglas High School Public Safety Act with bipartisan support three weeks after the shooting, in which a 19-year-old shot and killed 17 people. 

While the law bans firearm sales to Floridians between the ages of 18 and 21, it doesn't prohibit them from possessing guns. The bill also banned bump stocks, an attachment that allows semiautomatic weapons to fire at a faster rate. 

Florida gun shop

A sign for a gun shop in Miami, Florida.  (Godong/Universal Images Group via Getty Images)

FATHER OF PARKLAND SHOOTING VICTIM SPEAKS OUT ON TRAGIC ANNIVERSARY: 'CRIMINALS DON’T OBEY GUN LAWS'

The National Rifle Association challenged the law, but the U.S. Court of Appeals for the 11th Circuit ruled Thursday that the law does not violate the Second Amendment

"The Act’s restriction on the sale of firearms to 18-to-20-yearolds is consistent with this Nation’s relevant historical tradition of firearm regulation," the three-judge panel wrote. 

Marjory Stoneman Douglas High School shooter Nikolas Cruz is sworn in during the penalty phase

Marjory Stoneman Douglas High School shooter Nikolas Cruz is sworn in during the penalty phase of Cruz's trial at the Broward County Courthouse in Fort Lauderdale on Wednesday, Sept. 14, 2022.  (Amy Beth Bennett/South Florida Sun Sentinel via AP, Pool)

CLICK HERE TO GET THE FOX NEWS APP 

The NRA did not immediately respond to a request for comment on Thursday evening. 

Florida's legislature could change the law in the upcoming session. State Rep. Bobby Payne, a Republican, introduced a bill earlier this week that would lower the age to purchase firearms back to 18.