Share story shares tanked in after-hours trading Thursday after the online retail giant posted a second-quarter loss that was larger than Wall Street expected and projected continuing huge losses in the current quarter.

The company blamed the second-quarter red ink in large measure on price competition in its cloud-computing business, Amazon Web Services. That business, known as AWS, cut prices from 28 to 51 percent earlier this year to protect its market-leading position from competition from such deep-pocketed rivals as Google, IBM and Microsoft.

Those cuts helped AWS grow its usage by 90 percent, Amazon Chief Financial Officer Tom Szkutak said in a conference call with investment analysts. But it also led to much slower revenue growth than the business had been recording.

North American sales in the “Other” category, which includes AWS results, grew 38 percent in the quarter. In the year-ago period, North American “Other” sales grew 64 percent. Szkutak pointed to the price cuts as the culprit for the slower growth.

“It certainly did impact our [second quarter] results in a meaningful way,” Szkutak said.

For the quarter, Amazon reported $19.34 billion in revenue, a 23 percent gain. It lost $126 million, or 27 cents a share, compared with a $7 million loss, or 2 cents a share, in the year-ago period.

Analysts expected the company to lose 15 cents a share on sales of $19.3 billion.

Amazon shares fell $37.86 to $320.75 in after-hours trading, a decline of 10.6 percent. In the day’s regular trading, Amazon shares climbed 47 cents to $358.61.

For shareholders hoping Amazon might yet eke out bigger profits, the company disappointed them once again. For the third quarter, the company said operating losses should be between $410 million and $810 million, compared with a $25 million operating loss in the third quarter of 2013. That expanding red ink will come even though Amazon said sales should climb 15 to 26 percent in the third quarter to between $19.7 billion and $21.5 billion.

Szkutak pointed to investments the company continues to make in new business opportunities, even at the expense of short-term financial gains. In addition to the AWS price cuts, the company plans to spend to build out infrastructure to support that business, said Szkutak, though he didn’t disclose the amount.

Amazon also plans to invest heavily in acquiring and creating original content for its Amazon Prime Instant Video service, which competes against Netflix. In the third quarter alone, Szkutak said Amazon will spend $100 million on homegrown original series for the service, which include programs such as the John Goodman political comedy “Alpha House.”

“We’re ramping up the spend,” Szkutak said.

He also pointed to increased spending on a new breed of warehouses, called sortation centers, which collect goods delivered from the fulfillment centers where products are located and sorts packages by ZIP codes in order to deliver them to local post offices. Those sortation centers — of which there will be 15 in the United States by year’s end, including one in Kent that opened earlier this month — enable both Sunday delivery and speedier midweek deliveries as well.

“We’re investing on behalf of customers and shareholders,” Szkutak said on a conference call with journalists after the results were announced. “It’s impacting short-term results.”

Robert W. Baird & Co. analyst Colin Sebastian thinks the stock slide is largely the result of Amazon’s guidance of large losses in the current quarter. The company’s shares, after taking a battering in the early part of 2014, had climbed more than 20 percent in the past few months.

“What you are likely seeing is some profit-taking, and the unwinding of some high expectations,” Sebastian said in an email interview.

Szkutak also noted Amazon’s decision in March to increase the price of its Prime subscription service, by $20 to $99, hasn’t seemed to hurt the company. Szkutak said that the increase in the number of Prime subscribers in the quarter was larger than the increase in the second quarter of 2013.

“We’re really pleased with the Prime program,” Szkutak said. “It’s growing really fast.”

He also noted that the number of customers converting free trial Prime memberships into paying subscriptions has increased, though he didn’t offer details. But those Prime subscribers are more likely to purchase more items than Amazon’s non-Prime customers.

“They have great purchasing patterns,” Szkutak said. “We’re very pleased with what we’re seeing there.”

Szkutak offered no insight into early sales of Amazon’s new Fire Phone, which went on sale Thursday. And he shed no new light on the company’s dispute with publisher Hachette, which has objected to Amazon’s tactics in negotiating a larger share of e-book revenue.

Amazon also noted that it now has 132,600 employees, up 37 percent in the last year. That’s larger than Microsoft, which had 128,000 employees as of June 30 and before its plans to lay off 18,000 workers.

Jay Greene: 206-464-2231 or Twitter @greene