(Reuters) - Hasbro Inc (>> Hasbro, Inc.), the No. 2 U.S. toymaker, reported higher-than-expected quarterly earnings as strong demand for digital games more than doubled profit in its entertainment and licensing business, sending its shares to a record high.

The company's shares rose as much as 8.5 percent to $104.14. Hasbro quarterly sales also overtook larger rival Mattel Inc (>> Mattel, Inc.) for the first time in 17 years.

Hasbro's results were in contrast to Mattel, which reported a bigger-than-expected quarterly loss and drop in sales last week, hurt by poor demand by retailers for its Barbie and Fisher-Price brands and due to big discounts to move inventory left after weak holiday sales.

Hasbro's sales have been on the rise, especially after it won a lucrative contract from Mattel for dolls based on Walt Disney Co's (>> Walt Disney Co) princesses such as Cinderella and Frozen's Elsa in 2014.

Total sales from Hasbro's gaming category, which includes the high-margin digital gaming business and brands such as "Dungeons and Dragons", rose 10 percent to $253.3 million in the first quarter ended April 2.

The company's digital gaming unit also includes mobile game developer Backflip Studios LLC, which it bought in January. It makes games such as "Transformers: Earth Wars" and "Nerf Hoops".

"The (Backflip) business revenues have been accelerating as we brought onboard some new leadership and also, we see our brands like "Transformers: Earth Wars" performing well," Chief Executive Brian Goldner said on a conference call.

Hasbro's entertainment and licensing operating profit more than doubled to $11.3 million.

The company said it expects sales in the coming quarters to be boosted by upcoming films including Marvel's "Guardians of the Galaxy Vol. 2", to be released early next month, and "Transformers: The Last Knight", to be released in June in the United States.

Revenue rose 2.2 percent to $849.7 million in the quarter. Net income attributable to Hasbro rose to $68.6 million, or 54 cents per share, from $48.8 million, or 38 cents per share, a year earlier.

Hasbro earned 43 cents per share, excluding an 11 cent benefit due to the adoption of a new accounting standard governing stock compensation for employees. The company said it had earlier expected an 8 cents benefit.

Analysts on average had expected a profit of 38 cents per share and revenue of $822.1 million, according to Thomson Reuters I/B/E/S.

Up to Friday's close, the Pawtucket, Rhode Island-based company's shares had risen 23.5 percent this year.

(Reporting by Jessica Kuruthukulangara and Sruthi Ramakrishnan in Bengaluru; Editing by Shounak Dasgupta)

Stocks treated in this article : Walt Disney Co, Hasbro, Inc., Mattel, Inc.