Harry Potter, the star of Universal’s theme parks, should expect some new neighbors.

After days of speculation, Universal Studios owner Comcast Corp. announced plans on Thursday to buy DreamWorks Animation in a deal that values the studio at $3.8 billion.

That purchase, which is expected to close by the end of the year, gives the company a slate of modern and classic characters — from Frosty the snowman to Kung Fu Panda — as it continues to expand its theme park empire.

“DreamWorks Animation is a great addition to NBCUniversal,” Steve Burke, CEO of NBCUniversal, said in a statement. “Jeffrey Katzenberg and the DreamWorks organization have created a dynamic film brand and a deep library of intellectual property. DreamWorks will help us grow our film, television, theme parks and consumer products businesses for years to come.”

Theme parks around the world, including Universal, already use some DreamWorks characters including the Madagascar animals and Shrek. It wasn’t immediately clear how the acquisition would affect those deals, or plans already in the works for future parks featuring the studio’s intellectual property.

Dennis Speigel, president of Cincinnati-based consulting group International Theme Park Services, said those existing agreements would have been considered during the negotiations. He compared the current deal to Disney’s acquisition of Marvel in 2009, which went forward even though Universal has the exclusive rights to use key Marvel characters in Florida.

“You give and take a little because you’re getting such triple-A-class property,” he said.

Speigel said Thursday’s announcement is just the latest example of entertainment companies grabbing up intellectual property. Disney is in the middle of expansions in its U.S. parks featuring Toy Story and Star Wars — both part of acquisitions the theme park and film giant had made in past years.

Comcast has also been investing significantly in Universal, recently opening a Harry Potter-themed area in the Hollywood park, taking a majority stake in its Japan property and inking a deal to build a theme park in Beijing.

“Comcast is on a roll,” Speigel said. “Universal is on a roll. And this is a bright step for them to take for the theme parks.”

In a note to investors following Comcast’s first-quarter earnings release Wednesday, MoffettNathanson senior research analyst Craig Moffatt wrote that theme parks must be viewed as “a foundational element of the Comcast story” that contributed in large part to the interest in acquiring DreamWorks.

“Comcast investors have continuously warmed to the idea that the company’s theme parks are more than just a sideline business,” he wrote. “But few have really internalized just how reliable they have become as a growth engine for the consolidated business.”

Photo Credit: More Universal parks are likely to include Madagascar characters, which already are featured at Universal Studios Singapore. Evelyn Lim / Flickr