Amazon.com Inc posted a 10 percent decline in second-quarter earnings and gave a modest third-quarter outlook on Thursday, taking the shine off the world's largest online retailer and sending its shares down nearly 7 percent.

Amazon, fresh from announcing that it would buy booming online shoe store Zappos.com for $928 million, also reported slimmer operating margins, hit by a one-time litigation charge for a settlement with Toysrus.com.

Investors have come to depend on Amazon to outpace a soft e-commerce arena by capturing market share and launching new categories of goods, defying cutbacks in consumer spending that have hammered retailers from Wal-Mart to eBay .

But the modest results and strained margins caused by the litigation charge and foreign currency exchange rates, took some of the luster off the dominant player in the online retail world, especially with many investors already viewing its stock as overvalued.

Bernstein Research analyst Jeffrey Lindsay said a spectacular unprecedented performance in the quarter would have been needed to justify the recent run-up in shares.

Stock in Amazon is up 80-plus percent since the start of 2009, well in advance of the Nasdaq and outpacing main rival eBay.

Amazon had run up a lot because it was the only real growth story left and everyone was buying in on it for the last couple of months on pure momentum. It's one of the biggest overshoots we've seen in recent years, Lindsay said.

It's a wake-up call that the pricing has become unrealistic, he said.

DOWNTURN NOT OVER YET

Amazon reported second-quarter net profit of $142 million or 32 cents per share, compared with $158 million or 37 cents per share a year ago. That was a penny above the 31 cents expected on average by analysts, according to Reuters Estimates.

Operating margins stood at 3.4 percent in the quarter, below the 5 percent seen in the first quarter.

Revenue rose 14 percent to $4.65 billion, shy of the $4.69 billion analysts' had expected. Excluding currency fluctuations, revenue rose 20 percent.

But the revenue rise lagged the 18 percent gain seen in both the first and fourth quarters, buoyed by the company's Amazon Prime free shipping program and new shoppers.

It wasn't the blow-out quarter necessarily you've seen from them in recent quarters, said McAdams Wright Ragen analyst Dan Geiman.

Investors may have underestimated the effect of the global spending slowdown and assumed that Amazon was more resilient than it was, Lindsay said.

This downturn is far more severe than people are factoring in, and it's not over yet, he said.

Chief Financial Officer Tom Szkutak blamed the industry slowdown mainly for flat growth in the North America media category, which includes books. Limp sales of video games and consoles also hurt.

He did not answer a question on whether book sales were being cannibalized by digital downloads of books sold for the Kindle, the company's much-touted electronic reader whose sales figures are never disclosed.

And Amazon would not clarify whether the Zappos acquisition would add to earnings this year. The deal will catapult Amazon to the top of the online shoe market while allowing it to ride Zappos' popularity, the result of a free shipping and its returns program.

The deal is now seen as likely to clear an antitrust review.

Looking ahead, Amazon forecast third-quarter revenue of $4.75 billion to $5.25 billion, compared with analysts' expectations for $4.92 billion.

Amazon forecast operating profit between $120 million and $210 million.

Shares fell 6.6 percent to $87.66, after closing up 5.72 percent at $93.87 on the Nasdaq.

(Reporting by Alexandria Sage; Editing by Edwin Chan)