Viacom reached a wide-ranging carriage deal with Time Warner Cable that includes carriage of premium cabler Epix for the first time — an amicable resolution for two companies that haven’t always seen eye to eye.

Details of the pact were not disclosed. The multiyear deal covers Viacom’s portfolio of channels and content across multiple platforms for TW Cable subscribers: linear TV, video-on-demad, authenticated websites and apps. Along with the TWC TV app, subscribers will be able to access on-demand content within Viacom-developed apps from Nickelodeon, MTV, VH1, CMT, and Comedy Central.

The deal will bring Epix, a joint venture of Viacom, MGM and Lionsgate, from being available to just over 30 million households to around 40 million, according to Viacom. The Epix network and companion Internet services are available through pay-TV providers including Dish Network, Cox, Charter and Verizon FiOS. The two biggest U.S. distributors, Comcast and DirecTV, do not offer Epix.

The parties reached the agreement ahead of the Dec. 31 deadline — averting any last-minute wrangling that occurred the last time Viacom and TW Cable were at the bargaining table. That was actually a thirteenth-hour situation: The duo’s previous agreement expired at midnight Jan. 1, 2009, before they agreed on a tentative deal to avert a blackout then.

In 2011, Viacom and TW Cable threw punches over the MSO’s iPad app for in-home streaming. The media conglom sued Time Warner Cable, claiming the streaming service violated their distribution deal; the parties later settled out of court.

The new deal also extends to Bright House Networks, which has an agreement with Time Warner Cable to piggyback on the larger operator’s programming contracts.

For the first time, Time Warner Cable will offer Epix to subscribers, making available approximately 3,000 titles on VOD to Time Warner Cable and Bright House Networks digital customers. Epix’s programming lineup includes recent movies and library titles, including: “The Hunger Games” (pictured above), “Skyfall,” “World War Z” and “Star Trek: Into Darkness.” In addition, it offers original documentaries such as “TWA Flight 800” and “Schooled: The Price of College Sports,” plus music and comedy events featuring performers including Madonna, P!nk, Ben Stiller, Seth Meyers and Patton Oswalt.

Viacom prexy and CEO Philippe Dauman congratulated his company and Time Warner Cable on their deal. “Together we crafted a progressive agreement that is a major step forward for consumers and also a model of collaboration for the multiplatform television industry,” he said in a statement.

Melinda Witmer, EVP and chief video and content officer for Time Warner Cable, said she was glad the deal was reached prior to the end-of-the-year deadline. “We’re working hard to provide our customers with easier access to the content they love,” she said in a statement. “This agreement will provide a more expansive offering to a wide array of our customers, from parents of young children to comedy and movie lovers and more.”

Among pay-TV providers, Time Warner Cable has been especially aggressive in programming negotiations. But its bruising fight this summer with CBS may have moderated its brinkmanship tactics. A monthlong blackout of CBS stations in key markets, as well as the loss of Showtime nationwide, contributed to Time Warner Cable’s worst-ever quarterly loss of video subscribers in Q3, when the operated shed 306,000 on a sequential basis.

Meanwhile, on Dec. 22, Tribune Co. and Time Warner Cable announced a retransmission-consent agreement for broadcast TV stations in New York, Los Angeles, Dallas, San Diego and Indianapolis, as well as the stations Tribune is acquiring from Local TV Holdings in Cleveland, Milwaukee, Kansas City and Greensboro, N.C. That agreement also covers TW Cable’s continued distribution of Tribune’s WGN America superstation.