CLEVELAND — An 11th-hour effort to settle landmark opioid litigation collapsed Friday night after a full day of unusual face-to-face negotiations, with the three main groups still far apart on key issues.

Summoned to the federal courthouse here by U.S. District Court Judge Dan Aaron Polster, state attorneys general, corporate executives and lawyers for 2,400 cities and counties that have sued the drug industry failed to agree on a proposed $50 billion plan to settle the lawsuits. That would have averted the first federal trial of the U.S. opioid epidemic.

Unless the three groups can resolve their differences in less-formal conversations over the weekend, the trial that pits two Ohio counties against six drug companies is scheduled to start with opening arguments Monday morning.

“We’ve . . . got a jury in the box. This case is going to trial,” said Joseph F. Rice, one of the lead attorneys for the cities, counties, Native American tribes and other groups who have filed suit against dozens of drug companies. Their cases have been consolidated in an enormous “multidistrict litigation” here.

Four state attorneys general who pushed for a settlement said the deal included $22 billion from the three major drug distributors and health-care giant Johnson & Johnson, along with $23 billion in anti-addiction drugs supplied by Israeli drug manufacturer Teva Pharmaceuticals. The wholesalers also would distribute those drugs and create a “clearinghouse” to keep drugs from pouring into small towns — services worth about $3 billion combined, said North Carolina Attorney General Josh Stein (D).

The three big wholesalers — McKesson Corp., Cardinal Health and AmerisourceBergen, which control 85 to 90 percent of drug distribution in the United States — are defendants in the trial set to begin Monday, along with Teva, the Walgreens retail chain and Henry Schein Medical, a smaller distributor. Polster chose the lawsuit brought against them by Cuyahoga and Summit counties as a test case, one designed to see how other plaintiffs may fare at trial.

Stein said the deal would send cash and medication to communities that urgently need them, but attorneys for the cities and counties wouldn’t agree.

“We are deeply disappointed that the cities and counties refused to go along with this deal,” Stein said.

But lawyers for those municipalities said the attorneys general were trying to dictate terms they couldn’t accept. Among those were the size of the package and a condition that the distributors would dole out the money over time, as the attorneys general signed up cities and towns to go along with the plan.

“The attorneys general are attempting to decide among themselves how to allocate the money,” said Paul Farrell Jr., who represents a West Virginia county expected to be a plaintiff in a second case lined up for trial.

Farrell said the distributors also have proposed leaving the state of West Virginia out of any monetary settlement, on the theory that the state previously settled with the three companies for a total of $73 million.

Representatives of the six companies did not respond to emails requesting a response or declined to comment.

Talks that began at 9:30 a.m. broke up shortly after 7:30 p.m. Polster shuttled between groups camped in rooms on two floors of the courthouse here but was unable to secure an agreement. Many lawyers said informal discussions would continue through the weekend, and they held out the possibility that the drug companies might settle solely with the two counties, rather than with all the plaintiffs who have sued them.

One of the points of contention was working out “the fees for the plaintiffs’ attorneys,” said one person familiar with the talks, adding that a proposed figure of $1 billion was being floated for covering attorneys’ fees for all 2,000-some cases. The person, like others, spoke on the condition of anonymity to discuss private deliberations.

But Rice said the municipalities had proposed allowing Polster to set attorneys’ fees, which is common practice in multidistrict litigation. He said typically that results in fees of less than 10 percent of a settlement.

The prescription opioid epidemic has taken more than 200,000 lives over the past two decades; another 200,000 people have succumbed to overdoses of heroin and illegal fentanyl.

Lawyers and corporate executives from around the globe began the day in Polster’s 18th-floor courtroom, hearing from five officials from some of the hardest-hit communities in North Carolina, Wisconsin, West Virginia, New York and Indian Country.

One by one, they recounted how their communities had been devastated by opioids.

"We need the money now," Milwaukee County, Wis., Corporation Counsel Margaret Daun said she told Polster. "And local governments like the one I represent need control over the money. . . . We don't want saving people's lives to be hijacked by party politics."

A West Virginia official recounted 26 overdoses in a five-hour period, according to one participant.

Polster, who has encouraged a negotiated settlement for nearly two years, warned the parties this could be their last hope for a quick resolution. If they failed to reach a settlement, he said, a jury would be seated for opening arguments Monday in the biggest civil action in American history.

Polster also said that nobody could anticipate how those jurors would decide, or how many years of appeals might follow, imperiling companies and communities affected by addiction.

Chief executives of McKesson, Cardinal Health and AmerisourceBergen, all in the top 16 companies of the Fortune 500 list, were on hand, along with representatives from Teva Pharmaceuticals and Henry Schein Medical. A representative for Walgreens, the sixth defendant, was in a separate room.

The attorneys for counties, cities, Native American tribes and other groups that have sued the drug industry remained in the courtroom. Attorneys general were in yet another room.

Early in the day, one attorney expressed optimism that a settlement could be reached.

“In terms of what’s on the table and the details of that, I think we can get a long way toward” a deal, said Peter Weinberger, an attorney for Cuyahoga and Summit counties.

But divisions between states and municipalities over control of the litigation complicated the talks. Ohio Attorney General Dave Yost (R), supported by several other states, unsuccessfully sought to stop the federal litigation and give control of the issues to state attorneys general.

Yost also criticized the four attorneys general from Texas, Tennessee, North Carolina and Pennsylvania, who had negotiated the proposed deal, for lack of consultation. He said it would be difficult for Ohio to join any settlement unless there was a mechanism to ensure that settlement funds go only to the addiction epidemic.

Defendants not involved in the current negotiations, such as pharmacy chains CVS, Rite Aid and others, still could face trials if a settlement is reached.