(Reuters) - Hasbro Inc reported a surprise quarterly profit on Tuesday as the box-office success of Transformers movie spin-off “Bumblebee” charged sales of its action toys, putting the company’s shares on track for their best day in more than two decades.

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

A departure from director Michael Bay’s action-heavy “Transformers” franchise, “Bumblebee” was the first film to come out of an expanded partnership between Hasbro and Paramount Pictures and made $470 million worldwide after its release late last year.

“Families going to watch Bumblebee during the Christmas break meant the toys were hot going into the start of 2019 ... and with the Blu-Ray out sales could see another uptick,” said James Zahn, senior editor at trade magazine The Toy Book.

Strong sales of Transformers and other long-running brands including Play-Doh and Monopoly also helped Hasbro deliver a surprise rise in quarterly revenue - the company’s first since the bankruptcy of key customer Toys “R” Us in 2017.

“(Bumblebee) is successfully introducing Transformers to a new generation of kids and re-engaging our core fans around the world,” Chief Executive Officer Brian Goldner said.

Hasbro shares were up 15.5 percent at $101.79 in early trading, while rival Mattel Inc rose about 4 percent.

The company also promised more profitable growth for the rest of the year, with big Disney movies lined up, including “Avengers: End Game”, which opens later this week.

Avengers toys lifted sales over the Easter weekend, and with new “Star Wars”, “Frozen” and “Spider-Man” movies due this year, revenue growth is expected to accelerate, the company said.

Hasbro’s focus on sealing deals with popular entertainment franchises comes as kids increasingly prefer video games and toys based on social media trends over G.I. Joe action figures and Barbie dolls.

The company has also poured more money on virtual games, turning its legacy “Magic: The Gathering” collectible cards game into a new revenue generating e-sports program.

New versions of the company’s popular Monopoly board game based on the video game “Fortnite” and the hit HBO show “Game of Thrones” have also helped reignite interest in family game night.

“Hasbro is crossing over different fandoms and bringing audiences that wouldn’t traditionally purchase a Monopoly game,” Zahn said.

The company posted earnings of 21 cents per share, beating the consensus market expectation of an 11 cent per share loss.

The results were a major recovery from a $112.5 million loss a year earlier, when the company was hammered by $61 million in costs from the bankruptcy of Toys “R” Us.