Netflix announced a deal Monday to air television programming from DreamWorks Animation in what the company described as its biggest transaction for original first-run content.

Although financial details were not disclosed, Netflix said the agreement includes more than 300 hours of new TV episodes in a multi-year deal starting in 2014.

The transaction is a major coup for both companies. It helps Netflix compete with pay TV channels such as HBO and Showtime and it gives DreamWorks a potentially lucrative outlet for its shows as it tries to shed its reliance on two or three big-budget movies each year.

While concerns remain about how much the deal will cost Netflix in the end, the company said it is a global deal that will allow it to debut the original series in the 40 countries where Netflix operates. That could help spread the costs over more territories and more subscribers if Netflix continues to grow overseas.

Investors hailed the deal. Netflix shares climbed 7 percent to close at $229.23, while DreamWorks shares rose 4 percent to close at $23.74.

As part of the arrangement, Netflix doubled down on original children’s programming, hoping to strengthen its push to become a family entertainment brand. The new content should ease some of the pain of losing a range of children’s shows from Viacom’s Nickelodeon network, including future episodes of “Dora the Explorer,” which snapped up for its streaming service in early June.

The deal suggests that DreamWorks will significantly ramp up its production of TV shows. Currently, it only produces “Dragons: Riders of Berk” for the Cartoon Network, which completed a run of 20 episodes at 23 minutes each — less than 8 hours of content in all — in March.

Netflix has said it has 29.2 million streaming video subscribers in the United States and 7.1 million internationally as of the end of March. Those figures are up 5.8 million and 4.1 million respectively from a year ago.