DENVER -- A Denver district court judge denied a motion by the police union to force the prosecution of the city's chief and deputy chief over a public records dispute.

The Denver Police Protective Association filed that motion in late June after District Attorney Beth McCann declined to file charges against the city's highest-ranking police officers.

McCann said Chief Robert White and Deputy Chief Matthew Murray were careless in their handling of the union's public records requests but she did not have evidence to prove they willfully broke Colorado's open records act.

The dispute arises from DPD's initial failure to produce a letter from former DA Mitch Morrissey that criticized the deputy chief's handling of a sexual assault case. The union twice requested the letter, DPD twice declined to release it. DPD only released the letter to the union after receiving calls from Denver7 asking questions about the denials.

In a ruling issued Wednesday, Denver District Court Judge Robert McGahey Jr. wrote, "a district attorney's decision not to prosecute a case can be challenged only if there is a showing by clear and convincing evidence that the decision was arbitrary or capricious and without reasonable excuse."

The ruling goes on to say that the DA's investigation made it "clear" White and Murray did not know they had copies of the letters and concluded that McCann correctly made an assessment about the likelihood of success at trial when she declined to press charges.

Murray and McCann declined to comment about the judge's ruling Wednesday.

An independent investigation of the case, conducted by a private firm and funded by the city, is still ongoing. The independent investigation followed Denver7's reporting about the case.

Copyright 2016 Scripps Media, Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.