Time Warner customers never needed to face life without Comedy Central and MTV, as the cable company reached a last minute agreement with Viacom.

The previous contract between Time Warner and Viacom had ended at 12:01 a.m. ET on Thursday (Jan. 1) and Viacom had threatened to pull the plug on its 19 cable networks (Viacom-owned BET is carried under a separate deal), depriving some 13 million subscribers of "The Daily Show," "Bromance" and "SpongeBob SquarePants." 

Instead, after negotiating all day on Wednesday, the two companies reached an agreement-in-principle early on Thursday morning. The companies said in a statement that they expect the final details of the new carriage plan to be hammered out in the next few days.

"We are pleased that our customers will continue to be able to watch the programming they enjoy on MTV Networks," Time Warner Cable President and CEO Glenn Britt says in a statement. "We are sorry they had to endure a day of public disagreement as we worked through this negotiation."

Viacom had marketed itself aggressively in the waning days of the former deal. The company had taken out advertisements in several major newspapers stating its side and had run a news crawl warning Time Warner Cable viewers that they might be losing their service.

Exact terms of the new deal haven't been announced. Time Warner executives had previously said that Viacom had demanded fee increases between 22 percent and 36 percent per channel, a figure Viacom executives, naturally, disputed. Viacom's claim was that while Americans spend a fifth of their time watching Viacom channels, Viacom's fees made up only 2.5 percent of the Time Warner cable bill, making a change necessary.

In the companies' statement, Philippe Dauman, President and CEO of Viacom says, "We've been partners with Time Warner Cable for a long time, and we're happy to be renewing that partnership for the benefit of their customers and our loyal viewers. It's gratifying that we could reach an agreement that benefits not only our audiences but that is also in the best interest of both of our companies."