(Reuters) - Hasbro Inc HAS.O on Tuesday beat Wall Street estimates for quarterly profit, powered by higher demand for action toys of blockbuster "Avengers: Endgame" and collectible card game Magic: The Gathering, sending its shares to a record high.

A Monopoly board game by Hasbro Gaming is seen in this illustration photo August 13, 2017. REUTERS/Thomas White/Illustration

The toymaker has been tying up with movie studios such as Paramount Pictures and Walt Disney Co DIS.N to boost sales of toys linked to big movie franchises as it recovers from the bankruptcy of retailer Toys 'R' Us.

Earlier this month, Marvel’s “Avengers: Endgame,” the end of a decade-long superhero series featuring Iron Man, Hulk and other popular comic book superheroes, became the highest grossing film of all time.

Revenue from partner brands, which includes tie-up with Disney, climbed 3% in the second quarter, while sales from Hasbro-owned brands, its largest business, gained 14%, mainly driven by Magic: the Gathering, Monopoly, Play-doh and Transformers toys.

The toymaker also reaffirmed its full-year growth forecast, banking on the lineup of big movies such as “Star Wars” and “Frozen” and new products such as Fortnite-themed Nerf guns and games under Magic: The Gathering, Dungeons & Dragons.

Stifel analyst Drew Crum said the strong entertainment line-up, new Power Rangers toys and easing impact from Toys ‘R’ Us set the company for a healthy second-half.

Hasbro has been spending more to digitize Magic: The Gathering and host e-sports events for the game to attract consumers who prefer video games and mobile entertainment.

The efforts paid off as revenue from entertainment, licensing and digital segment jumped 28% in the quarter.

It has also been spending to move more inventory into the United States than usual in the face of potential additional U.S tariffs on imports from China.

Despite the additional costs, Hasbro’s margins improved by 250 basis points and it earned 78 cents per share compared with expectations of 50 cents, according to IBES data from Refinitiv.

Net revenue rose by a better-than-expected 8.9% to $984.5 million.

Shares of the toymaker rose as much as 10.3% in morning trading and lifted those of rival Mattel Inc MAT.O 3%. Mattel is expected to report second-quarter results later this week.