Image source: Viacom. 

What: Shares of Viacom (NASDAQ:VIAB) (NASDAQ:VIA) jumped nearly 13% late Thursday after the media company announced it had agreed to a multiyear contract renewal with DISH Network (NASDAQ:DISH).

So what: Exact financial terms for the agreement were not disclosed. But this wasn't just any run-of-the-mill contract extension; earlier this week, Viacom stock plunged after the company revealed its difficulties coming to terms with the satellite radio behemoth.

"We are extremely disappointed that DISH has not engaged in a serious way to reach an agreement for Viacom's number one family of cable networks," a Viacom spokesman lamented. And DISH, for its part, responded that Viacom was "asking for hundreds of millions of dollars in increases, despite the changing landscape that includes drastically reduced viewership of Viacom channels and wide availability of their content across multiple platforms."

Now what: But today, Viacom CEO Phillipe Dauman insisted, "DISH has historically been and remains an important partner for Viacom, and as part of our commitment to entertain audiences wherever they are, we are pleased to offer select Viacom networks as part of DISH's Sling TV product. Today's renewal, together with several additional affiliate agreements announced over the past year, will enable Viacom to drive growth and deliver better, more engaging viewer experiences for years to come."

DISH chairman and CEO Charlie Ergen noted the agreement extends a nearly 20-year-old relationship, and stated, "We appreciate Viacom's willingness to continue with us on our journey as we work to deliver the best, most innovative television services available."

In short, this ensures DISH customers will have uninterrupted access to the 18 Viacom networks DISH currently carries, notably including Comedy Central, BET, Spike, MTV, Nick Jr., and TV Land. Finally -- and while specific packaging details weren't announced -- this paves the way for select Viacom live and video-on-demand content to join DISH's Sling TV single and multistream services. 

But in the end, Viacom investors are rightly relieved the two companies were able to strike a deal ahead of Viacom's scheduled fiscal second-quarter 2016 earnings call next week. And regardless of what Viacom says then, it's no surprise to see Viacom stock trading higher today.