Johnson & Johnson lost a landmark opioid trial in Oklahoma this week, but the blow wasn’t as bad as it could have been.

Attorneys for the state were seeking more than $17 billion in damages, though analysts expected an award closer to $5 billion. After J&J was ordered to pay only $572 million, it’s no surprise that pharma stocks, including J&J’s, rose after the decision.

Oklahoma Attorney General Mike Hunter addressed the disparity in a press conference after the ruling, saying he had secured meetings with legislators to look at other ways to hold J&J and pharma companies accountable.

“It’s going to be an important step forward in dealing with the epidemic,” he said. “Certainly we would’ve liked to walk out of here with $17.5 billion, but we’ve been able to put together almost a billion to help Oklahoma work it’s way through [the crisis].”

Hunter’s figure includes not only the $572 million from J&J, but also settlements this year from Purdue and Teva, which paid $270 million and $85 million, respectively. 

However, it remains to be seen what J&J will actually pay. The company said shortly after the ruling that it plans to appeal the decision and request a stay on its enforcement until the appeal is resolved. J&J’s statement predicted that the appeal process could run through 2021.

Meanwhile, J&J and other opioid makers and distributors are facing hundreds of pending lawsuits. The next one to go to trial is a massive combined federal case that will be presided by Ohio District Judge Dan Polster

J&J said in its statement that the Oklahoma decision has no implications for other lawsuits, and that the company “remains open to viable options to resolve these cases, including through settlement.”

However, Hunter said in Monday’s press conference that the record from the Oklahoma case could “assist” in others. 

“The record now available to my colleagues in other states certainly will assist around the country,” Hunter said. “There’s no question in my mind that we had to bring this case, that it had to be tried, that these facts had to see sunlight. That has been accomplished here.”

J&J was found responsible for the state’s opioid crisis under its public nuisance law, which in this case was defined as unlawfully doing an act, or omitting to perform a duty, that endangers the health and safety of others. Oklahoma Judge Thad Balkman wrote in his decision that J&J’s misleading marketing, and omission of the dangers of opioid addiction, fell under the public nuisance law.

J&J general counsel Michael Ullmann argued in the statement that the ruling is a “misapplication of public nuisance law.”

Balkman also preemptively addressed potential First Amendment challenges, writing that J&J’s marketing was “commercial speech” and therefore not protected by the First Amendment.

Balkman also laid out specifics of how the $572 million would be used. The abatement plan would establish addiction-treatment services including mental health care and specific personnel for juvenile opioid users; a statewide medication and disposal program; education for primary care and emergency doctors about opioids and addiction treatment; and training for emergency responders to use overdose-reversal treatment naloxone, among other efforts.