OKLAHOMA CITY (AP) — An Oklahoma appeals court has removed language that was critical of the state attorney general's office in an Open Records Act case involving communications between then-Attorney General Scott Pruitt and major energy companies as well as the Republican Attorney General's Association.

The Oklahoma Court of Civil Appeals ruled Monday the trial judge's characterization of the office as an "abject failure" in complying with the law was "surplus and unnecessary."

The wording is in a 2017 ruling that ordered the attorney general's office to provide the Wisconsin-based Center for Media and Democracy with records it had requested in 2015 involving Pruitt, who now heads the Environmental Protection Agency.

The court upheld the remainder of the order that the attorney general's office must provide the records, which it did in February 2017.