An individual buying a gun for another person—a “straw buyer”—must disclose the identity of the actual buyer during the sale, even if that person could have legally bought the firearm, the U.S. Supreme Court ruled Monday.

The high court, in a 5-4 decision, upheld the conviction of Bruce Abramski. Abramski was found guilty of making false statements after identifying himself as the actual buyer of a handgun, when in fact he was buying the gun for his uncle. Abramski, a former police officer in Virginia, was able to get a discount on the gun because of his law enforcement background.

“Federal gun law establishes an elaborate system of in-person identification and background checks to ensure that guns are kept out of the hands of felons and other prohibited purchasers,” Justice Elena Kagan wrote. “These provisions would mean little if a would-be gun buyer could evade them all simply by enlisting the aid of an intermediary to execute the paperwork on his behalf.”

That Abramski’s uncle could have legally bought the gun didn’t absolve Abramski of having to identify the uncle as the true buyer, Kagan wrote.