The U.S. government can require gun dealers in border states to disclose records of certain firearm sales, a federal appeals court has ruled, upholding a key component of the government's recent crackdown on illegal gun trafficking.

The ruling on Friday, by a unanimous three-judge panel for the U.S. Court of Appeals for the D.C. Circuit in Washington, comes over strenuous objection by the firearms industry. And it could renew calls among gun-rights supporters that the government's program trammels rights of gun sellers and...