A group of pro-gun advocates filed a federal lawsuit on Monday challenging a new California law that bars people under the age of 21 from purchasing firearms.

The lawsuit, filed in San Diego on behalf of two under-21 plaintiffs, as well as groups like the Calguns Foundation and Firearms Policy Coalition, argues that individuals over the age of 18 are legally considered adults and thus entitled to exercise their Second Amendment rights.

“Once individuals turn eighteen, they are adults in the eyes of the law,” John W. Dillon, the attorney representing the groups in their suit, said in a release. “Law-abiding adults are entitled to fully exercise all of their fundamental rights, including their Second Amendment right to keep and bear arms for all lawful purposes, not just hunting or sport.”

The suit challenges a law that went into effect in January, raising the age limit for purchasing of long guns, like rifles and shotguns, from 18 to 21. The law, which then-Gov. Jerry Brown (D) signed in September, amended an existing ban on handgun sales to individuals under 21 years.

State Sen. Anthony Portantino (D) introduced the measure last year after a 19-year-old gunman killed 17 students with a semiautomatic rifle in Parkland, Florida.

“I was determined to help California respond appropriately to the tragic events our country has recently faced on high school campuses,” Portantino said in a statement. “I feel it is imperative that California leads when Washington refuses to act. No parent should have to worry that a gun gets in the wrong hands and commits a heinous and violent tragedy on our school campuses.”

Brown at the time also signed a package of other gun measures, including a lifetime firearm ban for individuals convicted of certain domestic violence charges and a law requiring at least eight hours of gun safety training for applicants seeking concealed gun permits.

Monday’s lawsuit was filed on the same day the state enacted new regulations requiring background checks for every purchase of ammunition.

“The eligibility checks ensure purchasers are not prohibited from owning or possessing ammunition due to a felony and/or violent misdemeanor conviction or warrant, domestic violence restraining order, or mental health issue,” the California attorney general’s office said in a statement.