OxyContin maker Purdue Pharma LP reached a tentative agreement with some plaintiffs to resolve widespread litigation over its alleged role in fueling the U.S. opioid crisis and plans to tussle with states opposing its settlement offer in bankruptcy proceedings starting as soon as next week, people familiar with the matter said.

On Wednesday, lead lawyers representing more than 2,000 cities, counties and other plaintiffs suing Purdue, along with 26 states and U.S. territories, were on board with an offer from the company and its controlling Sackler family to settle lawsuits in a deal valued at up to $12 billion, the people said.

More than a dozen other states remain opposed or uncommitted to the deal, setting the stage for a legal battle over Purdue's efforts to contain the litigation in bankruptcy court, they said.