A judge in Virginia struck down a federal law this week that bars licensed firearms dealers from legally selling handguns to people under the age of 21 but older than 18.

In a 71-page ruling on Wednesday, Judge Robert E. Payne of the Eastern District Court in Richmond, Va., wrote that the age requirement was unconstitutional.

โ€œIf the Court were to exclude 18-to-20-year-olds from the Second Amendmentโ€™s protection, it would impose limitations on the Second Amendment that do not exist with other constitutional guarantees,โ€ wrote the judge, a George H.W. Bush appointee. โ€œBecause the statutes and regulations in question are not consistent with our Nationโ€™s history and tradition, they, therefore, cannot stand.โ€

The lawsuit was brought by John Corey Fraser, a Virginia man who was a 20-year-old college student in May 2022 when he attempted to buy a Glock 19x handgun from a licensed state dealer โ€“ a sporting goods store in Ashland, Va. โ€“ but was denied. The case has been turned into a class action lawsuit challenging the constitutionality of the 1968 Gun Control Act and other regulations imposed by the Bureau of Alcohol, Tobacco, Firearms and Explosives.

โ€œThe United States prohibits a class of law-abiding, responsible citizens from fully exercising the right to keep and bear armsโ€”those adults who are not yet twenty-one,โ€ the lawsuit states, calling the age restriction โ€œirrational.โ€

Adults under age 21 are allowed to purchase long guns, including shotguns and rifles, from federally-licensed dealers, but they have been barred from purchasing handguns. Payneโ€™s ruling would change that.

Elliot Harding, a lawyer representing Fraser and the other plaintiffs, told the Washington Post that he and his clients were pleased with Payneโ€™s โ€œwell written and thorough decision.โ€

โ€œEven though it ensures that future buyers can now purchase these firearms in the federal system, one that includes background checks and other requirements, we expect the defendants will appeal,โ€ Harding told the paper. โ€œNevertheless, we remain optimistic that the decision will be affirmed in due course.โ€

Payneโ€™s ruling extensively cited the Supreme Court case, New York State Rifle and Pistol Association v. Bruen which struck down a New York state law that put strict limits on carrying guns outside the home, and required applicants for gun-carry permits to โ€œdemonstrate a special need for self-protection distinguishable from that of the general community.โ€ Payne argued that the state failed to reference โ€œany evidence of age-based restrictions on the purchase or sale of firearms from the colonial era, Founding or Early Republic.โ€

Gun-control advocates have insisted that the Constitution does permit laws curtailing access to firearms as a means of saving lives.

โ€œNot only are guns the leading cause of death for U.S. kids and teens, but research shows us that 18- to 20-year-olds commit gun homicides at triple the rate of adults 21 years and older,โ€ Janet Carter, a senior director at Everytown Lawโ€™s told Fox News Digital.

โ€œThe Courtโ€™s ruling will undoubtedly put lives at risk,โ€ she added. โ€œIt must be reversed.โ€

Payneโ€™s ruling would not affect state laws that impose age restrictions on gun purchases, but it could lead to additional rulings. The Department of Justice is expected to appeal the ruling.