An Oklahoma judge Friday reduced the amount drugmaker Johnson & Johnson must pay for its role in that state’s opioid crisis, cutting the sum to $465 million to correct a math error he made in calculating a year’s worth of cleaning up the crisis.

In August, Cleveland County District Judge Thad Balkman found the health-care giant culpable and ordered it to pay the state $572 million to help clean up the damage it caused.

Balkman also turned down a request from the state Friday to assess whether the drug company should make additional payments in coming years. Balkman stuck with his original decision, made Aug. 26, that the state did not present enough evidence to calculate those costs beyond the first year.

The state had claimed it would cost more than $17 billion over 30 years to abate the impact of the drug epidemic.

The judge also refused to lower Johnson & Johnson’s payment further to take into account the state’s settlements with two other companies, Purdue Pharma and Teva Pharmaceuticals.

Balkman’s order appears to close, for now, the first state trial of the opioid era. Johnson & Johnson has appealed the verdict, reached in a nonjury trial.

The company issued a statement saying it is “moving forward with our appeal of this judgment because it is neither supported by the facts nor the law. We recognize the opioid crisis is a tremendously complex public health issue and have deep sympathy for everyone affected. We do not believe litigation is the answer and are continuing to work with partners to find solutions.”

Lawyers for the state declined to comment.

In the first federal trial against the drug industry, Johnson & Johnson last month reached a $20.4 million out-of-court settlement with two Ohio counties just weeks before proceedings were set to begin.

Balkman acknowledged at a hearing last month that in calculating the costs of a program aimed at infants born dependent on opioids, he had assessed Johnson & Johnson $107.6 million instead of $107,600.

He promised to correct the error while he considered the other requests and finalized his order Friday.