Alphabet’s quarterly earnings were dented by heavy investment in Google’s cloud-computing business, which is key to future growth but still runs a distant third in the market behind Amazon.comĀ  and Microsoft.

Net income was $7.1 billion, or $10.12 a share, down from $9.2 billion, or $13.06 a share, in the same period a year earlier, the company reported on Monday. Analysts expected $12.35 a share, according to data compiled by Bloomberg.

Alphabet shares fell about 1% in extended trading, after closing at $1,288.98 in New York.

Google, the world’s largest online search provider, has been building data centers, buying equipment and hiring salespeople to support its cloud unit, which rents computing power and software services over the internet. Former Oracle executive Thomas Kurian was hired late last year to reinvigorate this effort. In the latest period, expenses totaled $31.3 billion, up 25% from a year earlier. Capital spending was $6.7 billion, up 27%.

“We continue to invest thoughtfully in talent and infrastructure to support our growth, particularly in newer areas like cloud and machine learning,” Ruth Porat, chief financial officer of Alphabet and Google, said in a statement.

Alphabet is looking for new sources of revenue growth, beyond the main Google digital advertising business, and the cloud may be the company’s biggest opportunity. In July, Google said it expected to pull in $8 billion this year in cloud revenue. That’s still a lot less than Amazon and Microsoft.

Advertising

Total revenue, excluding payments to distribution partners, was $33 billion, compared with the average estimate of $32.72 billion. Google’s Other Revenue, which includes cloud and consumer hardware, was $6.4 billion. RBC Capital Markets analyst Mark Mahaney was looking for $6.6 billion.

Google’s ad revenue rose 17% to $33.9 billion, suggesting demand for the company’s search, video and web display ads remains strong, even as regulatory and privacy pressures mount. Alphabet shares hit a record earlier on Monday on optimism about the ad business.

Sundar Pichai, chief executive officer of Google, said “strong” sales growth was driven by mobile search, YouTube and cloud.