Google‘s parent company experienced a “tale of two quarters,” Alphabet chief executive Sundar Pichai said Tuesday, as first-quarter revenue increased 13 percent despite a drop-off in ad sales as the coronavirus pandemic hit.

The first two months of the year started strong, Pichai said. But as the economy started to shut down, consumers limited spending and companies started laying off employees and slashing costs. Google’s core business — digital advertising — suffered an “abrupt decline,” particularly as key customers such as travel websites slashed ad spending.

Still, people are using Google’s services more than ever, Pichai said. And many businesses are moving toward cloud computing, which allows companies to rent space from Google’s servers.

“We see businesses thinking deeper about the shift to digital,” he said. As Google moves resources during the crisis, “part of this is making sure our investments deliver value with respect to that shift.”

Alphabet reported that revenue grew to $41.2 billion in the first quarter, up from $36.3 billion a year ago. Profits were also up slightly to $6.8 billion.

The next quarter, which started April 1, is expected to show a fuller picture of the extent of the advertising slowdown. Google’s stock price ticked up 9 percent in after-hours trading Tuesday to $1,344.67, a sign that investors haven’t lost confidence in the powerful company’s ability to make it through the slump.

Alphabet was the first of the tech giants to report earnings this week, a foreshadowing of potential consequences for the broader industry as companies brace for the biggest economic downturn since the Great Depression. Still, the biggest tech companies are among those expected to make it through the crisis largely unscathed thanks to huge cash reserves and new consumer habits.

Amazon in particular is expected to report a big uptick in revenue Thursday when it reports earnings, thanks to a surge in online orders as people stay home. (Amazon chief executive Jeff Bezos owns The Washington Post.)

Google makes the bulk of its money from selling online advertisements across its search, YouTube and other products — a business that has been steadily growing for years as more advertisers move online. But as businesses cut marketing budgets and consumers close their wallets amid the coronavirus crisis, analysts expect Google’s core business to feel the pain and serve as a bellwether for other digital advertisers.

Google’s first-quarter financial results were not as bad as some investors had feared, and analysts said the company is well positioned.

“Google is in a fine financial position to be able to weather a storm,” said eMarketer analyst Nicole Perrin, noting that its results indicate that the impact of the pandemic on digital advertising might not be bad as it could have been.

Facing that reality, Google announced during its call that it is taking cost-cutting measures such as slowing hiring for the year, backing off from earlier plans in which it intended to hire about 20,000 people during 2020. It will also pause most construction of office space and reduce marketing budgets.

Pichai promised employees in an email early this month that no major layoffs were coming.

Still, with its huge cash reserves, the company is better positioned than smaller rivals.

On the call, Pichai emphasized the company’s cloud computing business, which is working with New York state on its unemployment website and online retailers such as Wayfair. As more companies evaluate an increasingly digital world, he said the cloud business is poised to pick up customers.

The company’s video streaming service, YouTube, is also seeing a spike in usage as people spend more time watching content online.

Google is also benefiting from a slowdown in dozens of regulatory probes launched last year to investigate potential antitrust behavior. In fact, Google and Apple are partnering with the government to help trace potential coronavirus cases.