The National Rifle Association filed a federal lawsuit this afternoon against the state to block a law that had just been signed by Gov. Rick Scott that prohibits gun sales to anyone between the ages of 18 and 21.

"We filed a lawsuit against the state for violating the constitutional rights of 18 to 21 year olds," said Marion Hammer, lobbyist for the NRA in Florida. NRA lawyers in Tallahassee and Washington D.C. were working on the complaint this afternoon, and filed the complaint moments before the court's deadline.

It was also filed more than an hour after Scott signed the Marjory Stoneman Douglas High School Public Safety Act into law.

“I’m an NRA member, and I was an NRA member when I became governor. I’m going to be an NRA member when I’m not governor,” Scott said. “I’m sure there are NRA members that agree with this bill, some that don’t agree with this bill.”

The lawsuit names Attorney General Pam Bondi and Rick Swearingen of the Florida Department of Law Enforcement.

The complaint says the new law prohibits law-abiding citizens between the ages of 18 and 21 from lawfully purchasing a firearm of any kind.

"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," it says.

The complaint says the law particularly affects young women.

“This ban particularly infringes upon, and imposes and impermissible burden upon the Second Amendment rights of those NRA members … who are female. Females between the ages of 18 and 21 pose a relatively slight risk of perpetrating a school shooting such as the one that occurred at Marjory Stoneman Douglas High School, or, for that matter, a violent crime of any kind.”

The complaint also says the law violates the 14th Amendment’s equal protection clause by banning adults between 18 and 21 from buying guns but does not apply such a ban to adults 21 and over.

Senior reporter Jeff Burlew contributed to this report.

Contact Schweers at Follow him on Twitter @jeffschweers.