Walt Disney Co agreed buy Marvel Entertainment Inc for $4 billion in a deal that would add characters such as Iron Man, Spider-Man and the Fantastic Four to its entertainment empire.

Disney is striking the biggest media deal of the year -- one that unites the Incredible Hulk and Mickey Mouse -- at a time when the entertainment business is struggling to cope with big spending cutbacks by both consumers and advertisers.

It is also paying a substantial price, a 29 percent premium for Marvel shareholders, and is undertaking its largest acquisition since the $7.6 billion purchase of Pixar in 2006.

But none of those risks deterred Disney from seeking out a deal to address an area of concern among investors: How can it better reach more young males.

This helps give Disney more important exposure to the young male demographic that they have sort of lost some ground with in recent years, said David Joyce, an analyst with Miller Tabak & Co.

Indeed, Disney has long been a blockbuster brand with girls thanks to characters such as Hannah Montana, Cinderella and Snow White, but has struggled to achieve the same kind of success with boys.

Movies such as Iron Man 2, due to hit the theaters next year, or 2011's Spider-Man 4 and Avengers should help resolve that issue.

Moreover, Disney will be able to use its marketing and entertainment might -- stretching from ABC to cable television to theme parks -- to promote and build characters such as Thor in ways Marvel never could.

To acquire Marvel, Disney agreed to pay a total of $30 per share in cash plus about 0.745 Disney shares for each Marvel share they own. The deal was approved by the boards of both companies.

The shares of Marvel, which was founded in 1939 and rolled out its first blockbuster character, Captain America, in 1941, shot up to a high of $49.29 before falling a bit to $48.38 in afternoon trading.

Disney approached Marvel a few months ago to get to know them, Disney Chief Financial Officer Tom Staggs told Reuters on Monday. The overture began with a meeting between Disney Chief Executive Robert Iger and Marvel CEO Ike Perlmutter and evolved into merger discussions over a series of meetings, Staggs said.

We at Disney had admired them because of their position and asset base, Staggs said. With conversations over time we came to believe in the value of a combination.

The shares of Disney, which will acquire ownership more than 5,000 Marvel characters, were down about 3.5 percent in afternoon trading. The deal is expected to close by year-end, but will not add to Disney earnings until fiscal 2012.

The acquisition came as a surprise, even though Iger had mentioned recently the company would consider acquisitions that bolstered Disney brands across international markets and on new technology platforms.

While it could kick-start more deal making in the media sector -- where stocks have outperformed the broader Standard & Poor's 500 this year -- few analysts see another bidder making a play for Marvel.

A major reason is the presence of Marvel's Perlmutter, who owns 37 percent of the company and will continue to oversee it within the Disney empire. Perlmutter will trade his stake in Marvel for a 1 percent stake in Disney, but will not receive a seat on its board of directors -- as did Pixar CEO Steve Jobs, a Disney spokesman said.

Disney executives drew a number of parallels between the Pixar and Marvel deals, and suggested it would keep the Marvel brand intact.

The goal here is not to rebrand Marvel, Iger said on a conference call.

Caris & Co analyst David Miller said Disney was sandbagging a little by estimating the deal would not add to its earnings for another two years.

They said the same thing with the Pixar deal, said Miller, who has above average ratings on both Disney and Marvel. I think they will make it accretive a lot sooner. They are underpromising, as they always do.

Miller said Disney would have to wait until Marvel's five- picture distribution deal with Viacom Inc's

Paramount expires to realize the full economic benefit of its films, but would immediately see a boost from its licensing operations.

This is going to catapult Disney's consumer products line in a huge way, Miller said. I believe this is going to do more for Disney Consumer Products than for the film studio.

(Reporting by Paul Thomasch; additional reporting by Franklin Paul, Gina Keating and John Tilak; editing by Derek Caney and Andre Grenon)