LOS ANGELES (AP) — DreamWorks Animation SKG Inc., the movie studio behind "Kung Fu Panda" and "Madagascar," said Monday that its films will be distributed by 20th Century Fox starting next year.

The five-year deal replaces an existing distribution agreement DreamWorks has with Viacom Inc.'s Paramount Pictures.

DreamWorks CEO Jeffrey Katzenberg said his company will continue to pay an 8 percent fee on gross sales in theatrical and home video markets, the same as its existing deal.

But its fee on such products as online movie rentals and movie downloads will drop to 6 percent as it benefits from the lower cost of delivering digital goods.

DreamWorks will also distribute its content to TV providers in the U.S. without paying a fee through a long-term deal with Netflix Inc.

"This deal is an absolute win-win," Katzenberg said on a conference call.

Distribution of DreamWorks films was up for grabs at the end of the year because of its pending split with Paramount, which is seeking to build its own lineup of animated movies.

Following last year's hit, "Rango," Paramount plans to move characters developed on its Nickelodeon channel for children onto the big screen. It is planning a "SpongeBob SquarePants" sequel and a movie based on the Teenage Mutant Ninja Turtles.

DreamWorks' animated titles will join those of News Corp.'s Fox. Its Blue Sky Studios produced the computer-animated hits "Ice Age" and "Rio."

Fox co-chairman Tom Rothman said that having one studio release both DreamWorks' and Fox's animated titles will help planning and give it some leverage with theater owners.

"It works very well to coordinate it," he said.

Standard & Poor's equity analyst Tuna Amobi said in a research note that the long-awaited distribution announcement "resolves a major near-term overhang," although he planned to examine the deal more closely.

Dreamworks shares rose 28 cents to $18 in after-hours trading. They closed down 13 cents at $17.72 in the regular session.

News Corp. shares fell 20 cents to close at $23.06.