U.S. District Judge Joseph Goodwin in Charleston found Wednesday that the law was not consistent with the United States' "historical tradition of firearm regulation," the new standard laid out by the Supreme Court in its landmark ruling.

The decision came in a criminal case charging a man, Randy Price, with illegally possessing a gun with the serial number removed that was found in his car. The judge dismissed that charge, though Price is still charged with illegally possessing the gun after being convicted of previous felonies.

A lawyer for Price and a spokesperson for the office of U.S. Attorney William Thompson in Charleston, which is prosecuting the case, did not immediately respond to requests for comment.

The federal law in question prohibits anyone from transporting a gun with the serial number removed across state lines, or from possessing such a gun if it has ever been transported across state lines.

Serial numbers, first required by the federal Gun Control Act of 1968, are intended to prevent illegal gun sales and make it easier to solve crimes by allowing individual guns to be traced.

Price argued that the law is unconstitutional in light of the Supreme Court's June 24 ruling in New York State Rifle & Pistol Association Inc v. Bruen. That ruling held that under the Second Amendment of the U.S. Constitution, the government cannot restrict the right to possess firearms unless the restriction is consistent with historical tradition.

Bruen said serial numbers were not required when the Second Amendment was adopted in 1791, and were not widely used until 1968, putting them outside that tradition.

(Reporting By Brendan Pierson in New York, Editing by Alexia Garamfalvi and Nick Zieminski)

By Brendan Pierson