DirecTV and Viacom have averted a blackout that would have removed channels such as BET and Comedy Central from the pay-TV service.

The contract between DirecTV parent AT&T and Viacom expired at midnight Friday, but the companies continued talks over the weekend. Viacom's channels remained on the TV service during talks and an agreement was reached early Monday.

"We are pleased to announce a renewed Viacom-AT&T contract that includes continued carriage of Viacom services across multiple AT&T platforms and products," the companies said in a joint statement sent to USA TODAY. "The deal also brings AT&T customers more choice and improved value for Viacom content. We expect to announce additional details in the near future."

The media company enlisted stars such as "The Daily Show with Trevor Noah" host and filmmaker and TV producer Tyler Perry to urge viewers to contact AT&T and DirecTV about their love of the channels.

AT&T, Viacom said, was not only sought to charge consumers “higher prices for an inferior product with fewer channels,” but also was marginalizing diverse audiences in its new DTV packages and threatening to do the same with their existing products.”

However, AT&T had said last week in a statement to USA TODAY it hoped "to avoid any interruption to the channels some of our customers care about."