A federal judge has ruled that state and local governments cannot publicize federal government data about where prescription opioids were distributed, a blow to news organizations seeking to report more deeply on the nation's overdose and addiction crisis.

The U.S. Drug Enforcement Agency is providing the information to state and local governments to use in their lawsuits against companies that make, distribute and sell the drugs. Sharing the data even with them came with a long list of conditions, including that it could be used only for law enforcement and litigation.

Cleveland-based Judge Dan Polster, who is overseeing more than 800 of the lawsuits in federal court, ruled Thursday that the data cannot be made public. He said that doing so would reveal trade secrets and "eviscerate" the terms under which the information was shared.

The federal government collects information on the distribution of all controlled dangerous substances.

The judge has scheduled the first trials in the matter to start in March 2019. He has been pushing in the meantime for a national settlement.

The drug industry and government entities, including states that have not filed lawsuits, have been negotiating for months even as the cases are prepared for trial. The drug industry is asking the judge to dismiss the lawsuits, arguing that the local governments do not have legal standing to sue over the matter and disputing that they caused the crisis, which involves drugs the federal government approved and doctors prescribed.

News organizations, including The Associated Press, had asked for the data through public records requests made to local governments.

The Washington Post and HD Media, owner of The Charleston Gazette-Mail of West Virginia, went to court for the records. The newspapers said they're considering whether to appeal Thursday's decision.

"We are disappointed, but we remain committed to fighting for records that shed light on the causes and costs of the opioid epidemic — records that the drug companies and federal government want to keep secret from the public," Gazette-Mail Executive Editor Greg Moore said in an email on Friday.

A West Virginia judge made some of the data public in 2016. The Gazette-Mail used it to report that 780 million pills flowed into the state, which has just 1.8 million residents, over a six-year period. During that time, more than 1,700 West Virginians died from overdoses of opioids, a category of drugs that includes prescription drugs such as OxyContin and Vicodin and illegal ones such as heroin and illicitly made fentanyl.

A lead lawyer for local governments suing over the drugs, Paul Farrell, said the data also would show the public which pharmacies sold huge amounts of the drugs.

Washington Post lawyer Karen Lefton said that "keeping the specifics secret does nothing to give victims' families faith that this deadly crisis is being adequately addressed."

Opioids killed more than 42,000 Americans in 2016, according to the U.S. Centers for Disease Control and Prevention.GEOFF MULVIHILL, AP

[cover photo AJEL via Pixabay]