* Quarterly loss comes after 18 quarters of net income
* Holiday quarter forecast misses analysts' expectations
* Amazon spending heavily on warehouses, Kindle technology, cloud business
SAN FRANCISCO, Oct 25 (Reuters) - Amazon.com Inc reported weak quarterly results on Thursday as the world's largest Internet retailer spent heavily and suffered from an economic slowdown in Europe.
Amazon shares slipped slightly to $221 in after-hours trading after the results.
The company said its third-quarter net loss was $274 million, or 60 cents a share, versus net income of $63 million, or 14 cents a share, in the third quarter of 2011. Part of the loss was related to an impairment charge from Amazon's investment in daily deal company LivingSocial.
Third-quarter revenue was $13.81 billion, up 27 percent from a year earlier, Amazon also said.
Amazon was expected to lose 8 cents a share in the third quarter on revenue of $13.9 billion, according to Thomson Reuters I/B/E/S.
Before Thursday's report, Amazon had generated 18 straight quarters of net income, according to BGC Partners.
For the crucial fourth-quarter holiday shopping period, Amazon forecast revenue that missed analysts' expectations. The company also gave a wide forecast for operating income in the period.
``There's increased competition from mass merchants and big box retailers embedded in that guidance,'' said RJ Hottovy, an equity analyst at Morningstar. ``There's a lot of competition this holiday and it's not clear how this will play out, even for smart operators like Amazon.''
Amazon is facing more competition this holiday season from big retailers such as Target and Best Buy, which are planning to match some of the company's prices online.
Wal-Mart Stores, the world's largest retailer, is also testing same-day delivery in some cities this holiday, while Target is selling more exclusive products that cannot be bought at lower prices online.
Amazon is also spending heavily on new distribution warehouses and technology to support its cloud-computing businesses, Amazon Web Services. It is also investing hundreds of millions of dollars a year on digital content to sell through its Kindle tablets and e-readers.
Those Kindle gadgets are being sold at cost, pressuring earnings in the short term. Amazon hopes to make money when customers use them to buy more physical and digital products from the company.
Europe's sovereign debt crisis and recession is reducing consumer demand, sparking concern that even fast-growing Internet companies may be affected.
EBay Chief Financial Officer Bob Swan said last week that the company expected an ``OK'' holiday season, partly because of macro pressure in Europe.
Amazon said on Thursday that revenue from North America was $7.88 billion, up 25 percent from a year earlier. International sales, including Europe, totaled $5.92 billion, up 17 percent from the same period in 2011.