CBS Corp. has struck a carriage agreement with AT&T’s U-verse service that covers all of the company’s broadcast and cable TV outlets, including distribution of cabler Pop for the first time.

CBS’ talks with AT&T went down to the wire on Tuesday night as the sides faced a midnight expiration of CBS’ existing contract. CBS has been pushing hard for fee increases on retransmission consent deals for its 29 TV stations as it has promised investors that the company will rep $2 billion annually in retrans revenue by 2020. CBS is said to have pushed for fees of $2 a sub in its most recent round of retrans negotiations.

AT&T is in the midst of the regulatory review of its pending merger with satcaster DirecTV. The telco undoubtedly would have preferred to wait until it had the clout of DirecTV, the nation’s second-largest MVPD, behind it at the negotiating table. But AT&T had no choice but to strike a new deal by the June 30 contract expiration date rather than run the risk of a CBS blackout, which would not have played well for the company in Washington.

The talks went past midnight Tuesday with executives in New York and Los Angeles. The deal includes limited TV Everywhere and VOD rights, as has become standard for major carriage pacts. Pop, the general entertainment channel that CBS owns with Lionsgate, will bow on U-verse in 2016.

“Ultimately, we both want to provide our customers with the shows they want, when and how they care to watch,” CBS and AT&T said in a statement.

U-verse has about 6 million video subscribers. The long-term fate of the service is unclear if AT&T’s $48 billion merger with DirecTV is approved. But the company has said that in the short term, U-verse will operate as a separate entity from DirecTV even if the deal is completed.