The state’s largest health insurer and a network of five Connecticut hospitals announced on Thursday night that they resolved their differences and inked a new contract.

Anthem Blue Cross and Blue Shield and Hartford Healthcare had allowed their previous contract to expire earlier this week without a new one in place.

Under the new agreement, Hartford HealthCare and Anthem will broaden their existing accountable care arrangement, which currently covers more than 40,000 Anthem members. The arrangement will include specialists and hospitals and will promote more proactive and coordinated management of patients across the care continuum, according to a joint statement from the insurer and the hospital.

More than 100,000 Connecticut residents could have been impacted by the impasse, but the new contract will be retroactive to Oct. 1 so there will be no gap in coverage for Anthem customers who see medical professionals at Hartford Hospital, The Hospital of Central Connecticut in New Britain, MidState Medical Center in Meriden, William W. Backus Hospital in Norwich, Windham Hospital, and The Institute of Living.

“We are pleased our members will again have in-network access to Hartford HealthCare’s hospitals and facilities,” Jill R. Hummel, president, Anthem Blue Cross and Blue Shield, said. “We are particularly excited by this new arrangement because of its focus on patient-centered care and value-based payment.”

According to Elliot Joseph, president and CEO of Hartford HealthCare, “We are pleased that Hartford HealthCare has been able to come to a multi-year agreement with Anthem Blue Cross and Blue Shield. For years, Anthem members have chosen Hartford HealthCare as their preferred health system because they recognize the high-quality health care services our hospitals and facilities provide.”

For the past few days, the two sides had been encouraged to stay at the negotiating table by numerous politicians.

“Without a quick resolution, patients, especially those who are dealing with chronic or acute illnesses, will be left with a difficult choice of either paying higher out-of-network rates or finding care elsewhere with another provider,” U.S. Sens. Chris Murphy and Richard Blumenthal said in a letter to Hummel and Joseph early Thursday.

Gov. Dannel P. Malloy and Lt. Gov. Nancy Wyman had also asked the insurer and hospital group to get back to the negotiating table.

“We’re not interested in assigning blame,” Malloy and Wyman said Wednesday. “We want to make sure that everyone in our state has access to affordable, high-quality healthcare. We simply cannot let profit margins stand in the way of that goal.”

On Thursday, Malloy, Wyman, and state Comptroller Kevin Lembo praised the two sides for reaching an agreement.

“I am grateful that this contract agreement will prevent any disruption in service to patients, including state employees, retirees, and their families,” Lembo said.

Anthem is the health insurance provider for most state employees and retirees.