Comcast Corp. made it official Thursday that it will acquire DreamWorks Animation SKG Inc. in a deal valued at $3.8 billion.

The Glendale animation studio behind such feature film hits “Shrek,” “Kung Fu Panda” and “How to Train Your Dragon” will become part of the Universal Filmed Entertainment Group, in Universal City, a division of NBCUniversal.

DreamWorks Animation Chief Executive Jeffrey Katzenberg will step down as head of the company and become chairman of DreamWorks New Media, which will be comprised of the company’s ownership interests in Awesomeness TV and NOVA, a backend technology venture that DreamWorks started last year.

Katzenberg said that NBCUniversal is the perfect home for DreamWorks Animation and one that will embrace the legacy of storytelling and grow its businesses to full potential.

“This agreement not only delivers significant value for our shareholders, but also supports NBCUniversal’s growing family entertainment business,” Katzenberg sad in a prepared statement.

Katzenberg started the studio as part of DreamWorks SKG with director Steven Spielberg and media mogul David Geffen. It was spun off as a separate public company in 2004 with a large campus in Glendale. It also has facilities in China and India.

Reports of Comcast’s interests in the animation studio began to surface on late Tuesday night. By Wednesday, the share price in DreamWorks Animation skyrocketed and hit a 52-week high and closed up 19 percent to $32.20.

The acquisition gives NBCUniversal a broader reach in the competitive children and family entertainment market. In addition to feature films, the studio also produces television series distributed on the Netflix streaming platform, live theatrical events and licenses its characters for use in overseas themed entertainment attractions.

“DreamWorks will help us grow our film, television, theme parks and consumer products businesses for years to come,” NBCUniversal Chief Executive Steve Burke said in a prepared statement.

The appearance of a buyer is not new for DreamWorks.

In September 2014, Japanese telecommunications and Internet company SoftBank Corp. made an offer to buy the studio in a deal valued at $3.4 billion.

Two months later, Hasbro Inc., the second largest toymaker, was in discussions on a merger but those talks did not lead to a deal.

These buyout offers came at a particularly glum period for DreamWorks, which was reeling from poor box office results on several films that resulted in write downs. In a restructuring of the feature film division, the company saw top executives leave as it cut the number of feature films released, closed an animation studio in Redwood City, laid off about 500 employees and sold its Glendale campus.