Amazon.com reported a 77% slump in quarterly profit as the company invests heavily in areas such as video content and in fast-growing economies such as India.
The company’s shares, already up nearly 41% this year, were down 2.6% at $1,019 in after-hours trading on Thursday.
The shares touched a record high of $1,083.31 in regular trading, helping Chief Executive Jeff Bezos unseat fellow tech billionaire Bill Gates to become the world’s richest person, according to Forbes. Amazon said operating expenses rose 28.2% to $37.33 billion in the second quarter ended June 30.
The company also forecast an operating income of $300 million to a loss of $400 million for the current quarter.
Analysts had expected operating income of $931 million, according to FactSet.
Get Data Sheet, Fortune’s technology newsletter.
Amazon is known for making bold investments in new business areas even at the expense of profits, a strategy that is often criticized by investors.
The world’s biggest online retailer said net income fell to $197 million, or 40 cents per share, from $857 million, or $1.78 per share, a year earlier.
Net sales rose 24.8% to $37.96 billion.
Amazon (amzn), which is in the process of buying upscale grocer Whole Foods (wfm), also plans to create more than 130,000 full-time and part-time jobs by mid-2018 to speed up delivery.
Analysts had expected a profit of $1.42 per share and revenue of $37.18 billion, according to Thomson Reuters I/B/E/S.
This story has been updated to add background information and details on shares.