A judge this month ordered the Maricopa County Sheriff's Office to pay The Arizona Republic and KPNX 12 News nearly $51,000 for its legal fees in obtaining public records.

The Sheriff's Office says it will appeal.

The newspaper and TV station in April filed public-records requests to obtain an investigative report from Arpaio's office.

The Pinal County Sheriff's Office conducted a six-month investigation into allegations of mismanagement and retaliation against employees within the Maricopa County Sheriff's Office. The allegations were contained in an internal memo authored by a whistleblower inside the department.

That investigation also found that the Maricopa County Sheriff's Office failed to adequately investigate more than 400 sex-crime cases, including dozens in El Mirage, over a two-year period because of poor oversight and because former Chief Deputy David Hendershott hoped to protect a key investigator from bad publicity.

The Maricopa County Sheriff's Office initially refused to release any records from the report and declined to specify when records could be disclosed. Sheriff Joe Arpaio's refusal prompted a lawsuit by the newspaper and TV station.

After the lawsuit was filed -- and after Hendershott and Deputy Chief Larry Black resigned in the wake of the investigation's findings -- the Sheriff's Office began to release parts of the report.

However, portions of the report relating to the conduct of Capt. Joel Fox were not released, with the office citing confidentiality statutes designed to keep certain information under seal while employees remained under investigatation, as Fox was at the time. Fox was fired and he filed an administrative appeal, but the office continued to withhold records relating to his conduct.

Maricopa County Superior Court Judge Judge Buttrick ruled in favor of the media partners, ordering the Sheriff's Office to release records relating to Fox after he filed an $8 million notice of claim against the state and Maricopa County.

On Dec. 1, Buttrick ruled that the Sheriff's Office must pay $50,565 to the media partners.

"The court's award recognizes the public's right to prompt access to public records, especially a report involving allegations of high-level corruption inside the Sheriff's Office," said David Bodney, an attorney who represented The Republic and 12 News.

Tom Liddy, an attorney for Arpaio, said The Republic and 12 News are not entitled to attorney fees because the records were released to the public as soon as the law permitted.

"The sheriff clearly recognizes and applauds the public's right to know," Liddy said.