(Reuters) - Alphabet Inc GOOGL.O on Tuesday beat analysts' estimate for quarterly revenue as its Google unit posted double-digit advertising growth despite the economic slowdown from the novel coronavirus.

FILE PHOTO: The logo of Google is seen in Davos, Switzerland Januar 20, 2020. Picture taken January 20, 2020. REUTERS/Arnd Wiegmann

Shares of Alphabet rose 4% to $1,282 following the after-hours release of financial results. Alphabet shares were down about 8% this year at Tuesday’s close.

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.

Alphabet Chief Financial Officer Ruth Porat told analysts on Tuesday that while users were searching more, they were looking up less commercial topics and advertisers were cutting spending.

“As of today, we anticipate the second quarter will be a difficult one for our advertising business,” Porat said.

Porat said search ad revenue had declined by a “mid-teens percentage” by the end of March compared with a year earlier.

Alphabet’s overall revenue in the first quarter was $41.2 billion, 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.

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.

Slideshow ( 2 images )

Google ad sales were $33.8 billion, up about 10% from last year’s first quarter.

“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.

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.

With usage of Google’s services up but sales down, the company in the current quarter has introduced what analysts have called “austerity” measures. It has pared hiring, internship programs, marketing, office expansions and other spending plans.

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

The company does not forecast revenue or profit. But the current quarter and remainder of 2020 could be bleak, according to some outside forecasts by ad agencies and other industry consultants. Two expected boosts to revenue - the U.S. presidential election and the Olympics - will offer smaller bumps because of the virus as campaigning grows more muted and the Tokyo games get pushed to next year. Some have estimated ad sales declines of up to 20% in the coming quarters.

Investors have become accustomed to unpredictability from Alphabet, though, even before the virus appeared. People have been interacting more with phones and smart speakers, which has forced Google to experiment with new ways to display ads, some of which advertisers have not valued as highly as legacy formats. Currency fluctuations and a greater push by advertisers to avoid offensive content have hurt Google, too.

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.

Its profit figures can be difficult to compare because they include gains and losses accumulated only on paper from its investments in startups and other outside businesses.