WASHINGTON, July 13 (AFP) - A US federal appeals court judge on Tuesday (Jul 14) declared unconstitutional a longstanding law banning handgun sales to people under 21 years of age, saying anyone over 18 should have that right.

Judge Julius Richardson, who was appointed to the appeals court in Richmond, Virginia by former president Donald Trump, based his ruling on the fact that 18-year-olds have the constitutional right to vote, and that when the Constitution was crafted they were required to join local militia with their own guns.

For that reason, Richardson said, the Constitution's Second Amendment granting the right to bear arms extends to 18-year-olds.

"Our nation's most cherished constitutional rights vest no later than 18," he wrote in his decision.

"And the Second Amendment's right to keep and bear arms is no different."

The ruling overturned a law dating to 1968 that banned licensed gun dealers from selling handguns to people under 21. The US Congress at the time reasoned that young adults committed more crimes than older ones.

It could lead to a challenge on gun rights going to the Supreme Court, which has swung firmly to the right since Trump named three justices after taking office in 2017.

The case arose from a complaint by a woman, horse-trainer Natalia Marshall, who was 18 when she tried to buy a handgun for protection from her abusive ex-boyfriend.

The ruling came amid a surge in gun violence, with many youths involved in the scores of shootings every week in cities across the country.

Richardson acknowledged the high crime levels, writing that there was no evidence that the 1968 prohibition has led to any meaningful or measurable positive effects.

"We appreciate the seriousness of gun violence in this country and applaud Congress's laudable desire to curb senseless violence," wrote Richardson.

"But we also recognize that the Second Amendment embodies a fundamental, pre-existing right that enables 'the people' to preserve their own life, liberty, and property."

Richardson had the support of a second judge in the case, while the third dissented, arguing that the original legislation was constitutional and well-founded, and did not prevent 18-year-olds from acquiring guns.