* Quarterly loss comes after 18 quarters of net income
* Holiday quarter forecast misses analysts' expectations
* Amazon spending heavily on warehouses, Kindle technology, cloud business
* Amazon CFO says demand for new Kindle devices 'fantastic'
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 $220.48 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 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 - and the mid-point of the range was lower than some analysts' estimates.
``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 Corp and Best Buy Co Inc , which are planning to match some of the company's prices online.
Wal-Mart Stores Inc, 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.
Amazon Chief Financial Officer Tom Szkutak said the company will continue investing heavily in technology and infrastructure and digital content.
The 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.
Amazon launched new Kindle Fire tablets in September and CFO Szkutak said demand has been ``fantastic.''
Chief Executive Jeff Bezos said in a statement that the new $199 Kindle Fire HD, the new Kindle Paperwhite e-reader and the entry-level $69 Kindle e-reader are the top three best-selling products on Amazon, based on unit sales.
Szkutak said Kindle Fire tablet users are purchasing a lot more digital content through the devices, as well as watching free video content.
The introduction of new tablets and e-readers should be good for digital content sales going forward, he added.
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 33 percent from a year earlier. International sales, including Europe, totaled $5.92 billion, up 20 percent from the same period in 2011.