An agreement to sell DreamWorks SKG Inc. marks the end of an 11-year dream for Hollywood moguls Steven Spielberg, Jeffrey Katzenberg and David Geffen.

The three men had ambitious goals for DreamWorks that once included television, music, films and the Internet. But on Sunday, Paramount Pictures agreed to buy the independent film studio for $775 million in cash. It will also assume $825 million in debt and other obligations, company officials said Sunday.

The move is seen as critical for Paramount, a unit of Viacom Inc. (VIA), which has been under orders from its parent company to reverse its troubled fortunes.

"We see this at Paramount as a transforming event for the studio," said Brad Grey, Paramount's chairman and CEO.

The studio will finance the deal by immediately selling the DreamWorks film library, which Paramount values at between $850 million and $1 billion. The company said it is in advanced talks with several parties and expects to have a deal within several weeks.

Paramount will retain distribution rights to the 59 library titles, which includes such hits as "American Beauty" and "Gladiator."

The agreement does not include DreamWorks Animation SKG Inc.(DWA) , which was the most profitable part of the company. The animated unit went public last year. Paramount does gain the right to distribute the animated studio's lucrative films for the next seven years, including the "Shrek" franchise.

It will also have the right to make television shows using DreamWorks Animation characters.

Grey said the arrangement with DreamWorks Animation makes Paramount a larger player in family and children's movies. Paramount already produces films with Viacom's Nickelodeon and MTV cable channels.

Upon completion of the deal, expected to close early next year, Paramount would sign new employment agreements with Spielberg as a producer and director, and Geffen, who will become chairman of DreamWorks.

Spielberg and Geffen will be responsible for producing four to six live action films a year, Paramount said. The move will increase its overall annual production to between 14 and 16 titles annually.

Paramount put its offer together just last week, after DreamWorks had been discussing terms with NBC Universal, a unit of General Electric Co. (GE), for nine months.

NBC Universal made an offer in September, then reduced it at the last minute. That angered Geffen, who said he was still talking to NBC Universal as late as Friday before finally accepting the Paramount offer.

The deal makes sense in the short term for Paramount, which was in much bigger need of an immediate boost in production and prestige, according to Harold Vogel, a longtime media investor and head of the Vogel Capital Management investment firm.

"Basically, GE was book smart and Paramount was street smart," Vogel said. "They're aggressive, they're hungry and they figured they could pay the price," Vogel said of Paramount. "GE was counting the beans."

DreamWorks had grand ambitions when it was created in 1994.

But the company was forced to scale back its ventures over the years. It abandoned plans to build a high-tech studio lot in Los Angeles in 1999, sold DreamWorks Records to Universal Music Group in 2004 and has curtailed its TV production. Its Internet site, Pop.com, also folded.

DreamWorks has had some hits over the years and more than its share of misses, including this year's "The Island," which tanked at the box office this summer.