Despite months of worries among Viacom investors and warnings of a potential blackout that came down to the wire, Viacom Inc. and Dish Network Corp. renewed their carriage agreement Thursday without any service interruption, sending Viacom’s stock soaring more than 12% in late afternoon trading.

Viacom is set to receive a mid-single-digit percentage increase in its affiliate fees from Dish for each year of the five-year contract, according to people familiar with the matter. Terms of the deal, reached after the latest contract extension expired Wednesday night, weren't publicly disclosed.

All 18 of the Viacom channels that had previously been carried by Dish’s traditional service will continue to be carried, while a selection of them—including MTV, Comedy Central and BET—will be carried for the first time by Dish’s Sling TV streaming service.

The fee increase will position Viacom to receive mid-single-digit affiliate fee revenue increases across all of its major distribution partners beginning in 2017, the people familiar with the matter said. In February, Viacom offered guidance that for fiscal year 2016, which ends in September, affiliate fee growth would be in the low to mid single-digit range.

“We believe that this agreement remains consistent with Viacom’s guidance for [mid-single-digit] affiliate pricing increases, suggesting the bear thesis of a price rollback is unfounded,” wrote Jefferies analyst John Janedis on Thursday.