A federal judge is ordering Attorney General Eric Holder to turn over documents concerning "Operation Fast and Furious."
The operation may have led to 2,000 weapons being transferred to drug dealers and kingpins, according to a congressional investigation.
But the Justice Department refused to comply with House subpeonas seeking information about the response to the undercover operation, which targeted trafficking along and across the Mexican border.
President Barack Obama also backed up the Justice Department by asserting executive privilege over the documents being withheld.
The move came only days before the House voted to hold Holder in contempt for not turning over the records.
On Monday, a judge rejected Holder's attempt to keep the courts from wading into the documents.
Some of the weapons from the operation have been involved in the fatal shooting of U.S. Border Patrol agent Brian Terry.
The family has since sued the federal government over the incident.