Shares of big drug distributors soared Wednesday on word of a potential settlement ahead of the first federal trial over the opioid crisis.

Two people with knowledge of the negotiations, which have lasted months, confirmed to The Associated Press that McKesson Corp., AmerisourceBergen Corp., and Cardinal Health, Inc., have offered $18 billion over 18 years to settle more than 2,000 lawsuits across the country. The people spoke on condition of anonymity because the settlement talks are ongoing.

The offer was first reported by The Wall Street Journal.

Shares of McKesson, AmerisourceBergen and Cardinal jumped 5% or more in midday trading.

All three companies are defendants in the first federal trial over the epidemic. Jury selection in that case, which will be tried in Ohio, was scheduled to begin Wednesday.

Investors have anticipated a settlement ranging from $15 billion to $25 billion over five to 10 years, Jefferies analyst Brian Tanquilut said in a research note. Uncertainty over liability for the opioid crisis has made investors skittish about the companies, Tanquilut said.

UBS analyst Kevin Caliendo believes a settlement would likely "put an end to the vast majority of future liability risk for the companies."

Counting prescription drugs and illegal ones such as heroin and illicitly made fentanyl, opioids have been blamed for more than 400,000 deaths in the U.S. since 2000.

That trial is considered a bellwether that could shape how future trials are conducted. It could even spur a global settlement over the opioid crisis sought by U.S. District Court Judge Dan Polster, who is overseeing more than 2,000 lawsuits filed by local governments and other entities against drug companies.

Five drug manufacturers, including Purdue Pharma, have already used settlements or bankruptcy filings to be dismissed from the trial.

____

Associated Press Health Writer Tom Murphy contributed to this report.