Amazon.com Inc. projected operating income that fell short of analysts’ estimates, worrying investors that it’s returning to a big spending cycle to fuel faster deliveries in the face of greater competition.

The company reported second-quarter profit was $5.22 per share, missing analysts’ average estimate of $5.56 a share. Revenue increased 20% to $63.4 billion, Amazon said Thursday in a statement. Analysts, on average, estimated $62.5 billion, according to data compiled by Bloomberg.

The Seattle-based e-commerce company also said operating income in the current quarter will be $2.1 billion to $3.1 billion, well shy of analyst estimates of $4.34 billion. The results show that Chief Executive Officer Jeff Bezos has ambitions of spending the winnings from a big Prime Day sales event and continued revenue growth.

Amazon said it would spend $800 million in the second quarter to move to one-day delivery for its best customers. Chief Financial Officer Brian Olsavsky said the company spent more than that amount on the quicker-delivery effort because it was more expensive than expected to move inventory closer to customers.

Despite the cost, Olsavsky said the investment in speedier delivery would continue for several quarters. “Customers are responding and they like it,” he said in a briefing with reporters.

Operating expenses increased 21% to $60.3 billion in the period ended June 30, a faster pace than revenue. Shipping costs increased 36% to $8.13 billion.

Advertising

The current quarter is when Amazon invests in its facilities for the busy holiday shopping period, so big spending on the one-day shipping initiative spooked investors, said RJ Hottovy, analyst at Morningstar Inc.

“The company’s been pretty upfront about investing in one-day shipping,” he said. “This is their heaviest investment period of the year, so it’s when we’re most likely to see a pull back.”

While e-commerce remains Amazon’s biggest source of sales, other businesses such as cloud-computing, logistics for online merchants and advertising are growing faster and now generate almost half of the company’s quarterly revenue. The internet business is facing greater competition from rivals such as Walmart and under greater scrutiny from government antitrust regulators and lawmakers who argue Amazon acts like a monopoly to dominate the field.

Amazon shares declined about 2.7% in extended trading after closing at $1,973.82 in New York. The stock has gained 31% this year, pushing the company’s market value near the $1 trillion mark it surpassed briefly last September.

Amazon Web Services sales increase 37% to $8.38 billion in the second quarter, missing analyst estimates of $8.5 billion.

Revenue from seller services, including Amazon’s warehousing, packaging and shipping services, was up 23% to $12 billion. Sales growth in the first quarter was 20%.

Subscription services, mostly revenue from Prime memberships, gained 37% to $4.67 billion and other revenue, mostly Amazon’s advertising business, also increased 37% to $3 billion.