The negotiations were stalled for months over attorneys’ fees. Innumerable lawyers have contributed different amounts of work and have fought over who should get paid how much. Now, about $1.6 billion in fees and costs would be paid to private lawyers representing thousands of counties and municipalities, $50 million in costs and about $350 million to private lawyers who worked for states. (Many states are represented by their own salaried, government lawyers.)Another critical lever in advancing settlement terms has been the high-stakes gamble of a trial. The distributors have been locked in trial in a West Virginia federal court and in a New York state court. The West Virginia case is ongoing but on Tuesday, Letitia James, the attorney general for New York, announced a $1.179 billion settlement with the distributors that releases them from the case. That money would be deducted from the overall $26 billion settlement. Payments to New York could begin in two months, Ms. James said.A persistent tension in the talks has been over the division of funds among states and small governments, including cities and counties.The new settlement envisions a national formula for disbursing money to states and flexibility within each state to broker a deal with localities, so that the bulk of the funds is aimed at alleviating the opioid epidemic and preventing its recurrence.For months, states and counties elbowed each other, even as they fought with defendants. The distribution to each state now relies on extensive federal data and includes metrics like a state’s population, overdose deaths, opioid pill sales and disorders related to pain pill abuse.Most states will most likely work up their own disbursement plans. Ohio, North Carolina, Arizona, Texas, Florida and others have already brokered internal, state-specific formulas. Last month, the New York legislature passed bills that would ensure that all funds from the opioid litigation settlement would go into a “locked box,” to be used only to address the crisis.Johnson & Johnson is widely known as a company willing to try cases rather than settle, but it has faced rivers of adverse publicity recently: litigation over asbestos deaths related to its talcum powder, a recall of some sunscreens, and reports of rare adverse neurological events associated with its single-dose Covid vaccine. The company remains on trial in California state court but settled with the state of New York and two New York counties last month, on the eve of trial.