Seattle: Inc’s effort to get packages from warehouse to doorstep in a single day helped push the retail giant to its first year-over-year quarterly profit decline since early 2017.

The spending binge isn’t over. Amazon Chief Financial Officer Brian Olsavsky said Thursday that the costs of the company’s one-day delivery push will total some $1.5 billion during the holiday quarter. Amazon’s projections for operating income and sales in the period fell short of analysts’ estimates, and shares slumped as much as 9.1 per cent in extended trading.

Amazon Chief Executive Officer Jeff Bezos has promised since the company’s initial public offering to invest for the long haul, and he is proving again his willingness to endure a little short-term pain in a bid to expand. Facing slowing growth in its core e-commerce franchise in recent years, Amazon in April announced an initiative to cut the delivery window on millions of items for paying members of its Prime subscription program. That’s helped reinvigorate sales, if at a high price.

“Customers love the transition of Prime from two days to one day — they’ve already ordered billions of items with free one-day delivery this year,” Bezos said in a statement. “It’s a big investment, and it’s the right long-term decision for customers.”

The investments taking place across Amazon’s warehouses are “strategically necessary,” agreed Charlie O’Shea, an analyst at Moody’s Investors Service, but they “continued to weigh heavily” on the profitability of the retail business.

Third-quarter net income narrowed to $2.13 billion, or $4.23 a share, from $2.88 billion, or $5.75, a year earlier, the Seattle-based company said in the statement. It was the first year-over-year decline since the second quarter of 2017. Analysts, on average, estimated $4.59 a share, according to data compiled by Bloomberg.

Amazon projected operating income of $1.2 billion to $2.9 billion in the current quarter compared with analysts’ estimate of $4.31 billion. Sales will be $80 billion to $86.5 billion in the holiday period, the company said, suggesting the difficulty of sparking growth to Amazon’s levels of the past few years. Analysts projected $87.2 billion.

Operating expenses during the third quarter climbed 26 per cent, the steepest rise in more than a year, to $66.8 billion. Shipping costs soared 46 per cent to $9.6 billion.

Delivery is hardly the only place Amazon is investing.

Olsavsky said the company continues to build out software development and sales and marketing teams for the Amazon Web Services cloud computing unit, and hire for roles supporting its devices business, streaming video unit and international operations.

Amazon’s costs for technology and content — largely salaries related to employees in research and development and infrastructure for AWS data centers — jumped 28 per cent to $9.2 billion. The company’s total workforce increased 22 per cent to 750,000.

The stock decline after the results were announced was enough to knock Bezos off his perch as the world’s richest man. At the nadir of extended trading, Bezos fell almost $5 billion behind Bill Gates, according to the Bloomberg Billionaires Index.

Amazon also is facing increasing regulatory scrutiny, as the Department of Justice and Federal Trade Commission examine the practices of the largest US technology companies. Amazon has so far avoided fines of the sort levied by the FTC on Facebook Inc and by the European Commission on Alphabet Inc’s Google, but investors are weighing the risks should the spotlight stay on the company. President Donald Trump and Democratic presidential hopefuls alike have publicly criticised Amazon.

While the stock gained 19 per cent this year to close at $1,780.78 in New York, it has fallen 12 per cent since its July 15 high of $2,020.99. Investors had bid up Amazon shares on growing profits driven by AWS, services for third-party sellers and advertising.

The cloud-computing unit remains Amazon’s cash cow. Sales rose 35 per cent to about $9 billion in the third quarter. The unit’s operating income, $2.26 billion, accounted for more than two-thirds of Amazon’s total.

Still, AWS’s growth was the slowest since Amazon began breaking out the unit’s performance.

That was “absolutely” a concern for investors, said Tom Forte, an analyst at DA Davidson & Co. Amazon, which had a lengthy head start in building out a cloud-computing platform, faces steep competition now from well-funded rival offerings like Microsoft Corp’s Azure and Google’s Cloud Platform.

“You’re seeing some incremental competitive pressure from Microsoft” in particular, Forte said.

Revenue gained 24 per cent to $70 billion in the period ended Sept. 30. Analysts projected $68.7 billion.