Inc. showed Wednesday that it wasn't being hurt by economic weakness and high fuel prices, reporting second-quarter earnings that more than doubled and surpassed analysts' expectations. The Internet retailer also raised its full-year revenue projections.

Sales were strong in several sections of Amazon's massive marketplace, and the company was helped substantially by a $53 million non-cash gain from the sale of European DVD rental assets.

For the quarter that ended June 30, Amazon earned $158 million, or 37 cents per share. Amazon earned $78 million, or 19 cents per share, in the same quarter last year.

The company's revenue climbed 41 percent to $4.06 billion, including a 35 percent leap in North American sales. The number of total active customer accounts also jumped, rising 18 percent to more than 81 million.

Analysts polled by Thomson Financial had expected earnings of 26 cents per share on $3.96 billion in revenue in the quarter.

Amazon shares rose $5.87, or 8.3 percent, to $76.41 in after-hours trading, after finishing regular trading up $2.57, or 3.8 percent, at $70.54.

Sales of things like books, CDs and DVDs rose 31 percent to $2.41 billion in the second quarter, while electronics and other general merchandise sales soared 58 percent to $1.53 billion.

One closely watched measure, the company's net shipping cost, climbed to $128 million from $75 million a year earlier.

But Amazon also noted that revenue from shipping _ which includes earnings from its membership-based two-day shipping program, Amazon Prime, and its third-party shipping program, Fulfillment by Amazon _ rose to $186 million from $152 million.

In a conference call with analysts, Chief Executive Jeff Bezos said the company suspects increased fuel prices may give it a "relative advantage" over other retailers.

"Even just driving 10 miles these days is a few dollars worth of gasoline. And consumers, we suspect, are beginning to take that into account and try to do trip consolidation. So our free shipping offers and Amazon Prime are clearly of even more value to customers under that set of circumstances," he said.

The company generally offers customers free standard shipping on items that cost more than $25.

Dan Geiman, an analyst at McAdams Wright Ragen called Amazon's quarter a little better than expectations, saying that by his calculations the Web retailer would have earned 28 cents per share when excluding the European DVD asset gain.

"The positive, certainly, is they are bucking the broader macro trends. They're continuing to show that," he said.

And Jim Friedland, an analyst with Cowen and Co., said the quarter was solid across the board.

"Certainly given all the blood on the street, this is definitely a positive earnings," he said.

For the current third quarter, Amazon predicted sales of $4.20 billion to $4.43 billion; analysts had been looking for $4.23 billion in revenue.

The company increased its sales forecast for the rest of the year to a range of $19.35 billion to $20.10 billion. Analysts were expecting $19.60 billion.