As part of the deal, DirecTV has an option to add Viacom's EPIX movie channel. Earlier this week, DirecTV said Viacom's demand that it carry EPIX killed a potential deal.

"Viacom is extremely pleased to bring its programming back to DirecTV subscribers, and thanks everyone affected by the disruption for their patience and understanding during this challenging period," Viacom said in a statement.

"It's unfortunate that Viacom took the channels away from customers to try to gain leverage, but in the end, it's clear our customers recognized that tactic for what it was," Derek Chang, executive vice president of DirecTV, said in a statement.

During the latest blackout, Viacom estimated that 20 million customers lost their networks.

No terms were disclosed, but DirecTV said earlier in the dispute that Viacom was seeking fee increases of 30 percent, or more than one billion dollars. Viacom contended that the increases would amount to pennies a day for customers.

The fight between DirecTV and Viacom became so pitched, with ad campaigns blaming each other, that Comedy Central star Jon Stewart blasted both companies on the "Daily Show."

"Viacom and DirecTV, what are you doing here? You got ad campaigns blaming each other for taking the shows away, telling people to "rise up and demand it" like some kind of basic cable Arab Spring. I've got news for you: It's not," the "Daily Show" the host said.

The dispute between the two media companies was just the latest skirmish in a seemingly unending battle between cable and satellite companies and content creators over the fees they charge to carry their channels. It is a conflict that has previously ensnared the likes of Comcast, News Corp., Disney and Dish, and carries with it the specter of government intervention.

Cable providers blame escalating retransmission fees for rising subscription costs, while content creators counter that they are only asking to be compensated for the enormous expense of producing the shows that entice people to pay the cable bill in the first place.