(CNN) -- The Supreme Court on Monday upheld the conviction of a man who bought a handgun but broke the law by not disclosing his intent to resell it to a relative.
It was a rare setback for gun-rights advocates who contend government efforts to track and keep firearms out of the wrong hands go too far.
The court ruled 5-4 in the "straw" purchase case against Bruce Abramski, a former police officer who told a Virginia gun dealer in 2009 that he was the "actual buyer" of the Glock weapon. He then sold it to his uncle in Pennsylvania for $400.
Abramski said he and his relative were legally able to own it. But he was charged with making false statements, convicted and sentenced to probation.
At issue is whether such misstatements are "material" to an otherwise lawful sale and whether that kind of information should be kept by a federally licensed dealer.
The Obama administration said those who purchase from licensed dealers must follow the letter and spirit of the law to ensure accurate record-keeping and to make it easier to trace the weapon.
Gun rights advocates call Abramski a victim of vast government overreach, unfairly lumped into the same category as those who would buy weapons for criminals or for smuggling.
The high court in recent years has affirmed the broader individual right of Americans to own handguns for self-protection in the home.
And on this issue, it narrowly ruled for the stricter control, saying the "actual transferee/buyer" must disclose any intent to resell at the time of purchase.
"No piece of information is more important under federal firearms law than the identity of a gun's purchaser," Justice Elena Kagan said, stressing that the dealer in this case could never have known to run a background check on Abramski's uncle.
She was supported in her opinion by Justices Anthony Kennedy, Ruth Bader Ginsburg, Stephen Breyer, and Sonia Sotomayor.
Federal law requires prospective buyers to check a box on an Alcohol Tobacco and Firearms form indicating whether they are purchasing a gun for someone else.
Abramski confirmed he was the buyer, but said he made clear all along that he planned to sell the weapon legally to his uncle was told the transfer could be completed by a licensed dealer, which he completed days later.
During oral arguments in January, some justices questioned whether signing the ATF form really solved the problem of keeping weapons out of the hands of the wrong people.
In his dissent Justice Antonin Scalia said the law in question was unclear.
"The court (majority) makes it a crime for one lawful gun owner to buy a gun for another lawful gun owner," he said. "Whether or not that is a sensible result, the statutes Congress enacted do not support it."
Scalia was backed by Chief Justice John Roberts and Justices Clarence Thomas and Samuel Alito.