UPDATED: Cable operator Altice USA and Disney have reached “an agreement in principle” after days of tense contract talks.

Talks between Altice and Disney went down to the wire Sunday afternoon against a 5 p.m. ET deadline for a new carriage agreement to avert a black out of ESPN, WABC-TV New York and other Disney-owned channels on Altice USA’s Optimum platform serving about 2.6 million New York-area subscribers.

The companies issued a joint statement shortly before 5:30 p.m. ET. “We have reached an agreement in principle and have extended the deadline accordingly to try and finalize the terms.”

On Friday, the sides agreed to a 24-hour extension because of Yom Kippur holiday that began Friday at sundown. The contract had been set to expire on Sept. 30.

Altice and Disney had been tussling publicly for more than a week over contract talks. Altice accused Disney of seeking enormous increases for networks that are losing viewership. Disney maintained that it has been able to reach deals with virtually every other MVPD, including the new wave of digital upstarts.

The contract at issue covers Altice USA subscribers in the New York-area that came with the company’s 2016 acquisition of Cablevision. Altice has a reputation for driving hard bargains with programmers at its video services in Europe and elsewhere.

Both sides have something to prove by taking tough stances in this negotiation. Altice is pushing Disney hard on the high cost of ESPN, which commands more than $7 per subscriber per month in most markets. Undoubtedly, Disney is looking for rate hikes for ESPN and other channels over a multi-year deal.

Altice has promised Wall Street it will generate economies of scale through the merger of the former Cablevision systems and the Suddenlink systems that were its first U.S. cable acquisition in 2015. Part of that process is securing more advantageous content pacts with programming giants such as Disney.

Altice USA ranks as the nation’s fourth-largest cable operator — behind Comcast, Charter and Cox — with about 4.9 million subscribers across 21 states. The acquisition of Cablevision brought the company into the high-end markets in New York and Connecticut. In June, the U.S. arm of the French media and telcom group headed by Patrick Drahi raised about $1.9 billion in an IPO.

Disney, meanwhile, is already facing heavy investor scrutiny of ESPN’s long-term prospects given the sports cabler’s importance to the Mouse’s annual earnings. ESPN has already seen a steady decline in its overall subscriber base as more consumers shift away from big traditional cable bundle options toward smaller channel packages, some of which are crafted to avoid the sports channels that drive so much of the programming costs for distributors. Disney can’t afford to give in on terms for ESPN with Altice, lest that start a domino effect with its other MVPD partners.