A federal court case that had threatened to upend Massachusetts’ marijuana industry has been settled out of court.

The case was essentially a neighborhood dispute over a Cambridge medical marijuana dispensary.

Neighbors of the Harvard Square medical marijuana dispensary Healthy Pharms, who were led by Crimson Galeria, sued the dispensary. They used the RICO statute, a law crafted to address mob-related racketeering, to argue that Healthy Pharms and the businesses that support it are involved in marijuana crimes, because marijuana is still federally illegal. They argued that those crimes decreased neighborhood property values.

The case had high stakes because if a judge agreed that the RICO statute could be used to prosecute businesses allowed by the state, it could force Massachusetts to rethink its medical and recreational marijuana laws. Similar cases are pending elsewhere in the country, and experts say the question could eventually end up before the U.S. Supreme Court.

The neighbors also brought a separate case, a zoning appeal, in state court.

However, the neighbors agreed to dismiss both cases in November, according to court documents.

The dispensary is currently open, with branches in Cambridge and Georgetown.

The notice of dismissal filed with the U.S. District Court in Massachusetts did not contain a reason, but earlier court documents indicated that the two sides were engaged in mediation.

Scott Schlager, lead counsel for Crimson Galeria and an attorney with Nathanson and Goldberg, said the mediation led to a confidential settlement that involved “a substantial payment to our client.”

Crimson Galeria and the neighbors agreed to drop both the federal case and the zoning appeal in exchange for a “significant” monetary payment, Schlager said. He said the amount of the payment is confidential under the terms of the settlement.

Emma Quinn-Judge, a partner at Zalkind, Duncan and Bernstein who represents Healthy Pharms, said she could not comment due to the confidentiality of the settlement.

The settlement was reached soon before the zoning dispute was set to go to trial.

With the legal challenges settled, last month 4Front Holdings, LLC purchased Healthy Pharms. 4Front Holdings is a multi-state marijuana company that operates medical marijuana dispensaries in Maryland, Pennsylvania and Illinois. It purchased an Arizona dispensary at the same time as it bought Healthy Pharms.

The company intends to apply for a license to grow and sell marijuana for the Massachusetts recreational market.

According to 4Front, the company wants to expand Healthy Pharms’ Georgetown cultivation facility from 8,000 square feet of flowering canopy to 35,000 square feet. It will relaunch in the adult use market under another brand it owns, called Mission.