WASHINGTON (AP) — The Supreme Court says federal law does not allow a “straw” purchaser to buy a gun for someone else, even if both are legally eligible to own firearms.

The justices ruled Monday that the federal background check law applied to Bruce James Abramski, Jr. when he bought a Glock 19 handgun in Collinsville, Virginia, in 2009 and later transferred it to his uncle in Easton, Pennsylvania.

Federal officials brought charges against Abramski because he assured the Virginia dealer he was the actual buyer of the weapon, even though he had already agreed to buy the gun for his uncle.

The high court rejected Abramski’s argument that since both he and his uncle were legally allowed to own guns, the law shouldn’t have applied to him.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.