Northern Light Mercy Hospital in Portland in 2021. (Gregory Rec/Staff Photographer)

Northern Light Health and Anthem Blue Cross Blue Shield announced late Wednesday night that they have reached an agreement on a three-year contract to keep health coverage in network for about 30,000 Mainers.

In a joint statement, the hospital system and insurance company said the contract would be retroactive to Nov. 1. A contract between the two parties for non-hospital services — including physicians, specialists and walk-in clinics — ended Oct. 31.

“This new agreement allows our patients to continue receiving high-quality care from the providers they know and trust. Northern Light Health has long been a reliable source of care in Maine and will remain that for generations to come,” Northern Light President and CEO R. Guy Hudson said in a written statement. “Throughout the negotiations we kept our patients’ needs at the forefront, and we will continue to advocate for them and the communities we serve.”

Northern Light is the second-largest health care system in the state and operates Eastern Maine Medical Center in Bangor, Mercy Hospital in Portland, and a network of primary care and specialist services in much of northern and central Maine.

About 30,000 Anthem enrollees are Northern Light patients, including state employees and some nurses and firefighters.

“Anthem is deeply committed to ensuring Mainers have broad access to the care they need at prices they can afford,” Anthem President Denise McDonough said in a statement. “We’re pleased to have reached an agreement that keeps Northern Light Health in-network for our members and helps us continue delivering on our promise to improve lives and strengthen the health of our Maine communities.”

Karen Sanborn, a spokesperson for Northern Light Health, said Thursday that further details of the deal are being kept confidential, as part of the agreement between the two parties.

The two sides had been entangled in often-contentious negotiations on a deal — which included a formal mediation process that began in August — for several months.

Mitchell Stein, a Maine-based insurance industry analyst, said a deal was all but inevitable because the downsides for both Northern Light and Anthem for patients being out of network was too great.

“There was no way either of those two groups could walk away,” Stein said. “This is what always happens. They huff and they puff, but it’s always settled. Usually with not this much drama, but it always gets there.”

After negotiations stalled in August, Anthem said Northern Light’s current demands would cause an increase of more than $200 million in health care costs for Anthem’s customers over the life of the proposed three-year agreement. The insurance company said that was “not in the best interest of our members” and was concerned by Northern Light’s request to drop compensation related to quality of care.

At the same time, Northern Light sent a letter to Anthem leadership detailing “issues and concerns” that came up during negotiations, including withholding interim payments for services and a “cumbersome” prior authorization operation.

With the contract lapsed as of Oct. 1 with talks still ongoing, Anthem patients in Maine were considered out of network for a few hours until a one-month contract extension was signed.

If a patient receives out-of-network services, they typically have to pay higher out-of-pocket costs compared to in-network health care.