The U.S. Court of Appeals for the Second Circuit on Monday wiped out a $21 million judgment against Costco Wholesale Corp. for selling generic diamond engagement rings under the “Tiffany” name, clearing the way for a jury trial on the high-end jeweler’s trademark-infringement and counterfeiting claims.

A unanimous three-judge panel of the Manhattan-based appeals court held that a lower court judge incorrectly rejected Costco’s “fair use” defense for selling the otherwise unbranded rings, which it had marketed to customers for their “Tiffany” style and setting.