After a nearly two-month trial, Judge Thad Balkman of Cleveland County District Court ruled Johnson & Johnson had intentionally played down the dangers and oversold the benefits of opioids, breaching the state’s “public nuisance” law. On Monday, he ordered the company to pay the state of $572 million for the community destruction caused by prescription painkillers.

Judge Balkman relied on the state’s detailed estimates of what it would cost to remediate the effects of the opioid epidemic to determine the award. Oklahoma said it would need $893 million a year, or about $17 billion over 20 years, to provide addiction treatment, drug courts and other resources to repair the damage done by the opioid epidemic. Judge Balkman said the $572 million could pay for a year’s worth of services needed to combat the epidemic in Oklahoma, according to the New York Times.

“We would have liked to walk out of here with $17 billion, but we’ve been able to put together a billion dollars,” said Mike Hunter, Oklahoma’s attorney general, at a news conference on Monday.

Contracted with poppy growers in Tasmania, Johnson & Johnson supplied 60% of the opiate ingredients that drug companies used for opioids like oxycodone. The company that originally built its reputation on being a responsible and family-friendly maker of soap, Baby Powder and Band-Aids allegedly marketed opioids to doctors and patients as safe and non-addictive, the state argued. Janssen Pharmaceuticals, a Johnson & Johnson subsidiary, made its own opioids—a pill and a fentanyl patch.

“We have many strong grounds for appeal and we intend to pursue those vigorously,” said Sabrina Strong, a lawyer for Johnson & Johnson, according to the New York Times.

The state of Oklahoma had to demonstrate Johnson & Johnson was responsible for most of the opioid-related damage—from criminal justice to health care, foster care and treatment facilities. The state said the company aggressively targeted women, teenagers and veterans through campaigns promoting the safety and non-addictive properties of opioid prescription drugs. It said the company engaged with “front groups” of pain patients and pain medicine specialists, who insisted the drugs were effective for quotidian pain and minimize the risk of addiction, according to the New York Times.

Judge Balkman was harsh in his assessment of the company. In his ruling, he wrote that Johnson & Johnson had promulgated “false, misleading, and dangerous marketing campaigns” that had “caused exponentially increasing rates of addiction, overdose deaths” and babies born exposed to opioids.