(Reuters) - Walt Disney Co on Tuesday reported a quarterly profit that topped Wall Street forecasts as theme park crowds packed a new “Avatar” land, making up for a decline at the ABC broadcasting network.

FILE PHOTO: The sign of Walt Disney Studios Park is seen at the entrance at Disneyland Paris ahead of the 25th anniversary of the park in Marne-la-Vallee, near Paris, France, March 21, 2017. REUTERS/Benoit Tessier/File Photo

Shares of Disney rose 2.7 percent in after-hours trading to $108.99. Through Tuesday’s close, Disney shares had fallen 1.3 percent this year, compared with 0.8 percent increase for the Dow Jones Industrial Average.

The media and entertainment conglomerate reported adjusted earnings per share of $1.89 for October through December, ahead of the $1.61 analysts expected, according to Thomson Reuters I/B/E/S.

The company also announced it was expanding its “Star Wars” universe, hiring the creators of HBO hit “Game of Thrones,” David Benioff and D.B. Weiss, to write and produce a new series of films set in the galaxy far, far away.

Disney is working to transform itself over the next few years from a traditional media company into a digital entertainment leader to reach audiences that prefer to watch TV shows and movies online through subscription services such as Netflix.

In December, Disney announced a $52.4 billion deal to buy film, television and international assets from Twenty-First Century Fox Inc, a move that will allow it to offer more programming to online viewers.

Investors have been rattled by the loss of pay TV subscribers to ESPN, Disney’s largest network. That trend continued in the quarter, which also was hit by fewer college football games compared with a year earlier. The revenue paid by distributors to carry ESPN rose.

Profit at the media networks division fell 12 percent, mostly due to a decline at ABC, which saw lower advertising revenue and income from program sales, plus higher production cost write-downs.

To counter the shift to online viewing, Disney will launch a streaming service for sports fans in the spring called ESPN Plus to reach digital audiences, followed by a family entertainment offering in 2019. ESPN Plus will cost $4.99 per month, Disney Chief Executive Bob Iger said on a conference call.

“The company has clear tailwinds heading into 2018,” GBH Insights analyst Daniel Ives said.

For the December quarter, Disney reported net income of $4.42 billion and said revenue rose 3.8 percent to $15.4 billion. Analysts on average had expected revenue of $15.46 billion.

The media conglomerate recorded a $1.6 billion gain due to recent changes to the U.S. tax law.

The theme parks division generated $1.3 billion in operating income for the quarter, helped by strong park attendance and cruise ship bookings over the Christmas and New Year’s holidays, Disney said. Visitors flocked to an “Avatar”-themed land at Walt Disney World in Florida and to a “Guardians of the Galaxy” ride at Disneyland Resort in California, the company said.

Disney’s movie studio turned out three blockbusters in the quarter. They were “Star Wars: The Last Jedi,” “Thor: Ragnarok” and “Coco,” but operating income at the studio fell because of lower home entertainment and streaming sales.

Operating income for the studio declined 2 percent to $829 million, Disney said.