It’s unclear for how long or the exact terms of the agreement, but Anthem and Yale Medicine reached a deal two days before its contract expired.

The two groups have been in negotiations over how much one of the largest insurance companies in the state should pay one of the largest providers of medical services.

The deal means Anthem policyholders who see medical professionals at Yale Medicine facilities won’t have to pay out-of-network rates for their visits.

“On its face, today’s announcement is welcome news for Anthem customers who rely on Yale Medical for care,” Senate President Martin Looney, D-New Haven, said. “An interruption in care would have been devastating for patients. Moving forward, it is critically important that the consolidation of the health care market not leave patients without access to affordable, quality care.”

According to Anthem, under the new agreement, Yale Medicine and Anthem will broaden their relationship by implementing new approaches to managing cost and quality that provide incremental value to our mutual constituents. The tighter integration “will promote more proactive and coordinated management of Yale Medicine’s patients across the care continuum.”

Jill R. Hummel, president of Anthem Blue Cross and Blue Shield, said they are excited about the new agreement because “its focus on patient centered care and value based payment. This collaboration presents an excellent opportunity for Anthem and Yale Medicine to work together to improve patient health and outcomes while reducing the costs associated with avoidable admissions and services. When providers are given the tools and resources they need to focus on prevention, wellness and the coordination of care, and are rewarded when they improve health, it’s a recipe for success.”