"We believe strongly in the direct-to-consumer space and our content is a key driver of that ecosystem," NBC Universal CEO Steve Burke said in a statement. "The extension of the Hulu content-licensing agreement will generate significant cash flow for us, while giving us maximum flexibility to program and distribute to our own direct-to-consumer platform, as we build that business. Significantly, this transaction also affirms the value of our stake, provides a path to liquidity and ensures our continued equity participation in Hulu's success."

As part of the deal, Disney has agreed to pay Comcast for its Hulu content for the next five years. NBC channels will be on Hulu Live at a higher rate than previously agreed. NBCUniversal, CNBC's parent company, will also be able to run the same content on its own streaming service , which is expected to launch in next spring.

Comcast also will be allowed to sell its 33% stake in Hulu to Disney in 2024 at a valuation of at least $27.5 billion, even if the streaming service is worth less, according to the agreement. Comcast is guaranteed at least $5.8 billion for its Hulu stake, according to the agreement.

Comcast originally wanted to sell its NBCUniversal streaming service at around $12 a month. Then Disney priced its service at $6.99 per month in its recent announcement. This has prompted Comcast to decide to lower the price for its NBC streaming service, likely around $10 per month, according to two people familiar with the matter.

The paid version of NBCUniversal's streaming service will not let you watch live linear TV or same-season shows, according to people familiar with the matter. The free version of the service will require users to log in through their cable and satellite TV provider, but they'll be able to stream live TV from NBCUniversal channels and watch current-season episodes of shows, the people said. In effect, only pay TV subscribers will be able to get the fully featured streaming service from NBCUniversal.

NBCUniversal will have the option of ending most of its content license agreements with Hulu in three years, according to the announcement. In one year, NBCUniversal will be able to exhibit some of its own content that is currently exclusively licensed to Hulu in exchange for a reduced license fee for Hulu, the release said.

Currently, NBC gets paid more than $500 million a year from Hulu for its partnership.

Hulu bought back a 9.5% stake from AT&T last month in a deal that valued the company at $15 billion. Disney and Comcast had agreed to fund that purchase in accordance with their two-thirds to one-third ownership. Now, Comcast "will have the option but not the obligation to fund its proportionate share of Hulu's future capital gains calls and will be diluted if it elects not to fund," according to the release.

"Hulu represents the best of television, with its incredible array of award-winning original content, rich library of popular series and movies, and live TV offerings," Disney CEO Bob Iger said in a statement. "We are now able to completely integrate Hulu into our direct-to-consumer business and leverage the full power of The Walt Disney Company's brands and creative engines to make the service even more compelling and a greater value for consumers."

Disclosure: Comcast owns CNBC parent NBCUniversal.

Watch: Disney CEO Bob Iger releases statement on Hulu deal with Comcast