Purdue Pharma, the drug-maker owned by the billionaire Sackler family, has reached a $270m settlement in a lawsuit which claimed its opioids contributed to the deaths of thousands of people.
As part of the deal, the US firm will fund a new centre to study addiction.
Purdue is one of several firms named in the claim which alleged they used deceptive practices to sell opioids.
The deal is the first Purdue has struck amid some 2,000 other lawsuits linked to its painkiller OxyContin.
The lawsuit filed by Oklahoma claimed that in order to persuade doctors to prescribe their painkillers, Purdue, and other companies such as Johnson & Johnson and Teva Pharmaceutical, allegedly decided to "falsely downplay the risk of opioid addiction" and "overstate" the benefits of their drugs to treat a wide range of conditions.
The companies deny the claims.
On average, 130 Americans die from an opioid overdose every day, according to the Centers for Disease Control and Prevention.
In 2017, of the 70,200 people who died from overdose, 68% involved a prescription or illegal opioid.
Purdue said that the settlement with Oklahoma "resolves all of the state's claims against" against the company.
The family, who were not named in this lawsuit, said: "The agreement reached today will provide assistance to individuals nationwide who desperately need these services - rather than squandering resources on protracted litigation."
The Sackler family, who are worth $13bn, according to Forbes magazine, also said: "We have profound compassion for those affected by addiction."
Under the settlement, Purdue will pay $102.5m towards the creation of a National Centre for Addiction Studies and Treatment at Oklahoma State University.
The Sacklers themselves said that they will contribute $75m over five years to the centre.
The dynasty has increasingly been under the spotlight because of the wave of legal action the company and individual family members are facing.
They are prolific philanthropists, having contributed millions of dollars to the arts.
However, a number of major galleries recently announced that they would not accept donations from the family, including the Tate in the UK and the Guggenheim in New York.
A lawsuit filed by Massachusetts Attorney General Maura Healey recently released a number of potentially damning documents, including some that present former Purdue boss Richard Sackler as someone who does not view OxyContin as contributing to opioid addiction but instead blames the individuals themselves.
He wrote in an email: "We have to hammer on the abusers in every way possible. They are the culprits and the problem. They are reckless criminals."
Commenting on the settlement, Purdue's chief executive Craig Landau said: "Purdue has a long history of working to address the problem of prescription opioid abuse and diversion.
"We see this agreement with Oklahoma as an extension of our commitment to help drive solutions to the opioid addiction crisis."
Alexandra Lahav, a professor at the University of Connecticut School of Law, told Reuters it was likely that Purdue was in talks to settle other lawsuits.
"This may be the start of the dominoes falling for Purdue," she said.
But the Sackler family said that the agreement with Oklahoma "is not a financial model for future settlement discussions".
Purdue Pharma, Johnson & Johnson and Teva Pharmaceutical had attempted to delay a trial over the claims made by Oklahoma state which is seeking $20bn in damages.
However, on Monday the Oklahoma Supreme Court refused and the trial against the other defendants will go ahead on 28 May.
Oklahoma Attorney General Mike Hunter, said: "The addiction crisis facing our state and nation is a clear and present danger."
He said one of the goals of the state's legal action was to ensure "a dramatic abatement of the sale of pharmaceutical opioids".
He added that as part of the settlement with Purdue, Oklahoma has put an injunction in place to stop the company marketing analgesic opioids within the state.