After weeks of brinksmanship over carriage terms ended Sunday in a tentative, 11th-hour deal, the Walt Disney Company and the country’s No. 4 cable operator, Altice USA, have made it official.

The companies’ announcement, released after the close of trading on Wall Street, said they reached a “comprehensive distribution agreement” for carriage of a dozen cable networks for New York-area customers of Altice’s Optimum service, the former Cablevision platform, plus New York network affiliate WABC.

One of the major sticking points was ESPN, which has seen ratings and subscriptions drift down even as it spends heavily on sports rights. But the sports flagship and its many siblings are included in the pact, as is ESPN’s SEC Network, which Optimum will launch in late 2018, followed by ESPN’s ACC Network, which will take the place of another ESPN network in August 2019. College-oriented networks have become a prime business objective for many in the sports TV game, especially ESPN, but many distributors have chafed at adding yet more sports channels and point to the aggressive spending on rights even as ratings declined.

According to the announcement, Altice’s data-analytics platform will be used as ESPN preps its long-ballyhooed direct-to-consumer service.

“Altice USA is focused on providing the highest quality video and service experience to our customers at a great value, and our successful arrangement with The Walt Disney Company ensures that our Optimum customers will continue to receive the programming they want at a reasonable cost,” Michael Schreiber, EVP and chief content officer for Altice USA, said in the release. “We are pleased with the value and terms agreed to and we thank our customers for their support while we worked on their behalf to reach a fair agreement.”

Justin Connolly, EVP, Disney and ESPN Media Networks, added, “This agreement with Altice demonstrates the tremendous value and importance of ESPN, Disney and ABC content to any distributor. Together we are committed to delivering the best in sports, news and entertainment programming to Optimum customers, regardless of platform, including new networks from ESPN; ESPN’s upcoming multisport, direct-to-consumer offering; and New York’s most-watched station, WABC.”

Optimum customers will continue to be able to use authenticated streaming apps including Watch ABC, Freeform, DisneyNOW and ESPN.

Investors and the entire media industry had been watching the standoff closely, as it crystallized so many business factors, including cord-cutting, multi-platform viewing, time-shifting and live sports.