A Pennsylvania court heard oral arguments Monday in a case that pits Philadelphia District Attorney Larry Krasner against state Attorney General Josh Shapiro over Shapiro’s proposed $1 billion opioid settlement with four companies.

Krasner has called the settlement a “sellout,” saying it won’t compensate Philadelphia enough for the effects of the opioid crisis. The district attorney is pursuing a lawsuit against the same companies, and he sued Shapiro’s office in July, asking the state’s Commonwealth Court to declare that the attorney general can’t sweep away Krasner’s suit in the settlement.

Allegheny County District Attorney Stephen Zappala, whose area includes Pittsburgh, also sued the attorney general over the issue.

Shapiro’s office has said it’s up to local governments whether to join the settlement — but if they don’t, they could end up with nothing. Cities and counties have until Jan. 2 to decide if they want to take part. More than 70 local governments have signed up so far, the office said, out of about 380 counted for settlement purposes.

On Monday, the Attorney General’s Office also released an estimate of Philadelphia’s settlement share: up to $173 million, plus an additional amount — a percentage of $30 million — that hasn’t been specified yet.

Arguing on behalf of Krasner and Zappala Monday, attorney Catherine Hancock Dorsey said the district attorneys have “concurrent authority” with the attorney general to bring claims under the state’s Unfair Trade Practices and Consumer Protection Law. For the attorney general to “override” and release their claims would amount to an “institutional injury” to the district attorneys, Dorsey said.

Stephen Kovatis, representing Shapiro’s office, argued the DAs don’t have authority to sue the attorney general “on behalf of the Commonwealth.” He also argued that the DAs’ suits against the AG are premature in light of the ongoing settlement process.

“Our hope is that the district attorneys and the counties will participate in the opioid settlement, [and] will enjoy the benefits of it,” Kovatis said.

» READ MORE: Even as overdose deaths soar, pharmacies won’t dispense addiction meds for fear of DEA

The settlement deal that Shapiro and other state AGs have championed would cap years of legal wrangling with some of the companies sued over the opioid crisis. Local governments, tribes, and other groups have filed thousands of suits to recover costs from the deadly epidemic.

Pennsylvania would receive up to $1 billion under the $26 billion national agreement announced last July with three major pharmaceutical distributors — including Conshohocken-based AmerisourceBergen — and drugmaker Johnson & Johnson. The companies have admitted no wrongdoing.

Shapiro’s office is using a formula to divide the funds with 15% going to the state, 70% to counties, and 15% to government bodies that sued the corporate defendants.

The total settlement amount is payable over 18 years. Pennsylvania could expect to see about 20% of its share — $232 million — by next year, according to Shapiro’s office.

Forty-two states signed onto the agreement. But to maximize the payments each state receives, cities, counties, and other local government bodies within those states must agree to give up their own lawsuits, or any future claims, against the companies.

The “greater number that sign on, the more the state will receive,” the Attorney General’s Office said in a legal filing last month.

Mayor Jim Kenney was critical of the settlement figure when it was first announced last summer. “Philadelphia has been very clear with the attorney general that we will not agree to such a minimal amount of money over a long period of time — and incongruent to the scale of the damage inflicted,” spokesperson Kevin Lessard said Monday.

Dozens of opioid suits brought by Pennsylvania counties and other entities are being coordinated in a Delaware County court, including Krasner’s case and a separate suit filed by Philadelphia.

The court designated the Krasner suit as one of the few bellwether cases that can proceed to trial first, though no trial date has been set.

A spokesperson for Krasner said the office had no comment on Monday’s hearing, and could not speculate on when a ruling will be issued.