(Reuters) - A drop in Google ad sales steadied in April and some consumers returned to using the search engine for shopping in addition to finding novel coronavirus information, parent Alphabet Inc (GOOGL.O) said on Tuesday, sparking an 8% rally in shares.

FILE PHOTO: A 3D printed Google logo is seen in this illustration taken April 12, 2020. REUTERS/Dado Ruvic/Illustration

The share rally to $1,329.81 after hours brought the stock almost back to where it started the year.

Some financial and advertising analysts had estimated ad sales declines of up to 20% in the coming quarters, with hotels, airlines, film studios and other big spenders cutting ad buys because of the coronavirus pandemic.

But Alphabet said search ads, its most lucrative business, saw revenue decline by a mid-teens percentage in late March compared with a year earlier and that the slowdown did not worsen this month.

The company also is working to lure money from advertisers that normally sponsor sporting events canceled by the coronavirus.

“While, obviously, there’s an impact on the economy and we’re not immune to that, the engagement from advertisers across our products and with our teams has been very robust,” Alphabet Chief Executive Sundar Pichai told analysts on Tuesday.

Alphabet Chief Financial Officer Ruth Porat still warned that she anticipated “the second quarter will be a difficult one” because the early April trends may not hold.

But Nicole Perrin, an analyst at ad consultancy eMarketer, said the first-quarter results matched “relatively optimistic scenarios” and left her “cautiously optimistic” about the current quarter.

Alphabet’s overall revenue in the first quarter was $41.2 billion (33.1 billion pounds) , up 13% compared with the same period last year. The average estimate among financial analysts tracked by Refinitiv was $40.29 billion, up 10.87%, expecting the slowest growth since 11.1% in the second quarter of 2015.

Alphabet was the first major U.S. internet services company to report first-quarter results, offering a preview of what other companies might report in coming days. Shares of Google’s top rival in ad sales Facebook Inc (FB.O), which had been down 8.6% this year entering Tuesday, rose 3% after hours.

Microsoft Corp (MSFT.O) rose 1.2% in extended trading after rising 10.7% this year, and Apple Inc (AAPL.O) rose 0.6% after entering Tuesday down 3.3%. Shares of Amazon.com Inc (AMZN.O), up 28.6% this year as shoppers turn to it amid lockdowns, were up 1.25% after Alphabet’s results.

VIRUS CHALLENGES

A booming economy and rising internet usage have driven Google to record revenues in the last few years. But the virus has split those two trends, with consumer spending now plunging and reliance on internet services surging.

While Google tools including Duo video chatting and YouTube have become essential to many users this year, the company largely does not charge for them and instead generates revenue selling ad tools as well as links, banners and commercials on its services and those of partners.

But more than 26 million people have filed for unemployment during the last month in United States, Google’s largest market for ad sales, erasing all of the country’s job gains in the last decade. Google’s ads business generated about 83% of Alphabet’s revenue last year. It tends to flow with the broader economy, which explains Alphabet’s slower revenue growth in the first quarter.

Google ad sales in the first quarter were $33.8 billion, with about 73% coming from search and 12% from YouTube.

“YouTube provided an upside surprise, with growth actually accelerating despite the impact on ad budgets from the lockdowns,” said James Cordwell, analyst at Atlantic Equities.

Revenue from YouTube grew 33.5%, slightly faster than during the previous quarter. But Porat warned that the growth rate had slowed to the “high single digits” by late March and continued to decline in April for ads that were not meant to immediately spark a consumer purchase.

The company did not release the number of paid subscribers for YouTube services, after revealing it had 20 million last quarter.

About 5.5% of Alphabet’s revenue last year came from cloud services for which Google charges businesses, schools and governments. This year, the company has extended various free offers to aid customers affected by the pandemic.

The cloud business generated $2.8 billion in revenue, up 52% from a year ago.

Alphabet’s total costs and expenses rose about 12% from a year ago to $33.2 billion, down from around 20% jumps in recent quarters. Porat said first-quarter expenses included an increased reserve to account for clients unable to pay bills because of the virus.

Slideshow (2 Images)

With usage of Google’s services up but sales down, the company has pared hiring, marketing, office expansions and other spending plans.

Google just three months ago had said it would be spending heavily to add staff for its cloud business and other areas where it is challenging to unseat dominant competitors.

Alphabet’s first-quarter profit was $6.8 billion, or $9.87 per share, compared with the analysts’ average estimate of $7.21 billion, or $10.40 per share.

Reporting by Paresh Dave in San Francisco and Munsif Vengattil in Bengaluru; Editing by Bernard Orr and Lisa Shumaker