Purdue Pharma, the maker of Oxycontin, has settled with Oklahoma for $270 million after it was accused of fueling the nation's opioid epidemic, the state's attorney general said Tuesday.

The deal was reached roughly two months before the scheduled start date of a televised trial in Oklahoma, where charges that Purdue deceptively marketed OxyContin would have been on full display in a state hit hard by the opioid crisis.

Under the terms of the settlement, Purdue and the family that owns it, the Sacklers, have pledged $197.5 million to expand an addiction treatment and research center at Oklahoma State University in Tulsa. The drugmaker has earned more than $35 billion from the sale of OxyContin.

Purdue has agreed to provide $102.5 million in cash and $20 million worth of addiction treatment medicines, with the Sacklers putting up an additional $75 million over five years starting in 2020, according to a person familiar with the deal.

A foundation associated with the Oklahoma State University Center for Health Sciences Center for Wellness and Recovery will be set up to receive the funds, according to state officials.

The settlement also calls for Purdue to pay $60 million for litigation costs and another $12.5 million to the state to combat opioid addiction.

"The addiction crisis facing our state and nation is a clear and present danger," Oklahoma Attorney General Mike Hunter said in a statement. "Deploying the money from this settlement immediately allows us to decisively treat addiction illness and save lives...This endowment will allow the university to expand its footprint to a national level to combat the crisis."

A Purdue representative described it as "a creative solution, an innovative solution and it’s going to be a resource to help people battle addiction."

"Purdue is very pleased to have reached an agreement with Oklahoma that will help those who are battling addiction now and in the future," said Dr. Craig Landau, CEO of Purdue Pharma. "We applaud Attorney General Mike Hunter for his leadership in making such an agreement possible."

A trial for the other drug makers sued by Oklahoma is scheduled to open in late May.

Purdue is still facing 1,600 other lawsuits blaming it for promoting OxyContin while underplaying the drug's addictive properties.

By cutting the deal, Purdue pushed its day of reckoning to the fall when the first trial from the 1,600 lawsuits will kick off in a federal court in Ohio where the cases have been consolidated. But the trial will likely not be broadcast to a national audience; cameras are typically barred from federal courtrooms.

The drugmaker has been exploring a possible bankruptcy and has vigorously denied the claims against it.

Now that a deal has been reached, it remains unclear whether the evidence collected by Hunter will ever see the light of day.

Purdue has fought since 2016 to keep secret the evidence that was collected in a Kentucky trial that was settled in 2015 for $24 million.

That evidence includes a video deposition of Richard Sackler, a former top Purdue executive, that has never been released. The online health site STAT has been locked in a Freedom of Information Act battle over the documents in the case since 2016. Purdue is now appealing a state court ruling to release the records.

President Donald Trump has called for the Department of Justice to sue opioid manufacturers but no federal case has yet been filed. The Justice Department has indicated, however,that it would file a “statement of interest” — a brief outlining what the crisis has cost the federal government — in support of a case against opioid makers.

The $75 million donation from the Sackler family marks one of its first major gifts to opioid addiction research and treatment causes. The Sacklers are ranked by Forbes as the 19th richest family in America.

"This endowment will allow us to assist communities in Oklahoma and across the country that have been ravaged by the opioid epidemic with innovative approaches to addressing this health crisis," said Oklahoma State University Center for Health Sciences President Dr. Kayse Shrum.

The Sacklers' multiple charitable foundations are major donors to Asian art exhibits around the world and are responsible for a Smithsonian museum in Washington, D.C., that bears their name, as well as a major wing of the Metropolitan Museum of Art in New York City.

But activists in the United States and in the United Kingdom had been applying increasing pressure on museums in that country to reject Sackler family donations.