An Oklahoma judge is expected to issue what will be a landmark ruling Monday on whether Johnson & Johnson will be held responsible for the state’s opioid epidemic that officials say led to more than 6,000 deaths over nearly two decades.

The Oklahoma attorney general claims J&J and its pharmaceutical subsidiary Janssen aggressively marketed to doctors and downplayed the risks of opioids beginning in the 1990s. The company’s sales practices created an oversupply of the addictive painkillers and “a public nuisance” that upended lives and will cost the state $12.7 billion to $17.5 billion, the state says.

Oklahoma Attorney General Mike Hunter is urging Cleveland County District Judge Thad Balkman to force J&J to pay more than $17 billion in the first civil trial in the U.S. seeking to hold a drugmaker accountable for helping fuel the epidemic. The $17 billion — to be used as part of an abatement plan over 30 years — would provide funds for addiction treatment and prevention programs in the state, officials say.

J&J has denied any wrongdoing, and there’s always a chance it could settle the case out of court before the judge delivers his decision.

The company, which marketed the opioid painkillers Duragesic and Nucynta, says its products were highly regulated by the Food and Drug Administration, among other agencies, and that the state has not provided any evidence showing the company’s sales practices helped fuel the crisis.

J&J was the only defendant in the seven-week trial, which was streamed live and began on May 28. Purdue Pharma, the privately held maker of OxyContin that has faced the brunt of the blame for the nationwide opioid epidemic, reached a $270 million settlement with the Oklahoma attorney general’s office in March. Oklahoma also resolved its claims against Teva Pharmaceutical for $85 million just days before the trial in Cleveland County. Both companies denied any wrongdoing.

Johnson & Johnson attorney John Sparks disputed the legal basis Oklahoma is using to sue J&J, relying on a “public nuisance” claim. Sparks said the state has previously limited the act to disputes involving property or public spaces.

“The state ignores this well-established law and now argues that public nuisance allows them to compel any party allegedly contributing in any measure to a social problem to fund all programs that state administrators dream up to address it. This is not and should not be the law,” he said in a statement.

A ruling against J&J on Monday could mean more big payouts in similar cases across the country.

The Oklahoma trial has been seen by legal analysts as a litmus test for plaintiffs of some 1,900 pending cases against Purdue Pharma, J&J and other opioid manufacturers that were consolidated and transferred to a federal judge in the Northern District of Ohio. Legal scholars have compared the massive opioid litigation to the tobacco master settlement agreement in the 1990s, when the nation’s four largest tobacco companies reached a group settlement with 46 state attorneys general.

Excluding a settlement in the opioid case — drugmakers Endo International and Allergan agreed to pay a combined $15 million to avoid going to trial — the consolidated lawsuit is set to begin trial in October.

During arguments in Oklahoma, Hunter said J&J and others rushed to produce a “magic pill” in their pursuit of profits, while ignoring decades of scientific research that showed the dangers of opioids. Balkman heard testimony from victims of the crisis, including a father of a college football player who died of a drug overdose.

They “embarked on a cynical, deceitful, multibillion-dollar brainwashing campaign to establish opioid analgesics as the magic drug,” Hunter told the court. “Money may not be the root of all evil but ... money can make people and businesses do bad things. Very bad things.”

J&J said in court that its marketing and promotion of pain medications were “appropriate and responsible.” The company provided testimony from doctors and current and former employees who said the company’s marketing practices were appropriate.