Updated from 9:16 a.m. EDT

For an affable guy with a slight build, Jeff Bezos looks like the unlikeliest of bear wrestlers. Yet the

Amazon.com

(AMZN) - Get Report

CEO has again gone to the mat with the bears and knocked the wind out of them.

When the tech bubble was crashing a few years ago, many expected Amazon to crumble. Instead, it posted its first profit in 2003. When Amazon announced free three-day shipping for orders over $25, bears again warned it would weigh the company down. Instead, it built customer loyalty in an increasingly competitive marketplace.

Earlier this year, Amazon caused a lot of head-wagging when it debuted Amazon Prime, which for a $79 annual fee gives free two-day shipping, or overnight shipping for $3.99. But Amazon's second-quarter report showed not only was revenue stronger than analysts' forecasts, but operating margins were healthier than most were expecting.

One reason, Bezos indicated on the conference call, was that Amazon Prime was a factor. "In effect, Amazon Prime led to more shopping in more categories," he said, noting that the program could lead in coming years to a larger share of spending among what he called "convenience-motivated shoppers."

"Once people sign up and start using it, it changes the way they think about Amazon," he said. "It makes shopping simpler and improves availability so they can get it fast."

Amazon had disappointed investors in the past two quarters with deteriorating profit margins. While some analysts and investors believed Amazon would pull it off in the long term, few of them expected an improvement this quarter. That's one reason why Amazon's stock was trading up more than 10% after its earnings were reported Tuesday afternoon.

Amazon said it earned $52 million, 12 cents a share, in the second quarter ended June 30. That was below the 12-cents-a-share number of a year ago, but this quarter Amazon faced a tax expense of $56 million.

The shares recently traded at $42 on Wednesday, up more than 11% from Tuesday's close.

In addition, the company's third-quarter sales expectations set a midpoint above the current analysts' consensus.

Importantly, Amazon's operating profit of $104 million was 6% of revenue, an increase above its first-quarter operating margin of 5.7%. Analysts had been bracing for another quarter of deteriorating profit margins from Amazon, which have been a sore point with investors. Operating margins were still down from the year-ago figure of 6.2%.

Revenue rose 26% to $1.75 billion from $1.39 billion a year ago, also in line with analyst estimates. Excluding a $25 million benefit from foreign-exchange rates, revenue gained 25% on the year.

Analysts had been expecting a profit of 10 cents a share on a pro forma basis, and revenue of $1.73 billion.

Despite the surprising strength of Amazon's report, some analysts on the earnings call were sniffing around for signs that it may have been a fluke. Some of them repeatedly sounded out Bezos and CFO Tom Szkutak on whether the demand for advance orders of

Harry Potter and the Half-Blood Prince

drove a huge amount of Potter fans to the site, who did some extra shopping while ordering the new book.

Szkutak downplayed such concerns, noting that Pottermania added less than a percentage point to the 25% revenue growth in the quarter.

Instead, much of the strength in Amazon's revenue and operating profit came from non-U.S. markets. International revenue grew 50% to $793 million, a marked increase over the 33% growth rate last year. By contrast, U.S. revenue grew 13% to $960 million, much slower than the 21% growth rate of a year ago.

International operating profit surged 177% to $60 million, while the operating profit of the U.S. business grew 21%. Both profit-growth rates are substantially higher than they were a year ago (and higher than revenue growth rates), suggesting Amazon is having some success in creating a more efficient business.

Amazon saw brisk sales in most of its key product categories. Sales of media goods such as books and music grew 20% to $1.25 billion, while electronics grew 40% to $456 million and sales of other goods increased 103% to $51 million.

Free cash flow, a financial measure favored by Amazon itself, came in at $486 million for the trailing 12 months, up 17% from $417 million at the end of the previous quarter.

Amazon's spending on fulfillment and customer service was 8.7% of revenue, down from the 8.8% it spent in the second quarter of last year. General and administrative costs declined to 1.8% of sales from 2%. Marketing costs held at 2.3% of revenue. Amazon considers the cost of free shipping to be a marketing cost, so spending on Amazon Prime seems to have been offset primarily by a reduction in payroll costs.

The only substantial increase in spending came in technology -- especially hiring software engineers to improve search, Web services and seller platforms. Amazon spent $106 million on technology and content, or6% of sales; it had spent 5.1% of sales in the year-ago quarter.

Bezos suggested that the investments in technology and content would help spur growth in free cash flow in coming years. "A lot of what you seen in the technology and content line is going to make things better for our sellers and for people buying from them," he said.

For the third quarter, Amazon said it expected sales of $1.76 billion to $1.91 billion, or a growth rate between 20% and 31%. Analysts had been expecting sales of $1.81 billion.

The company expects operating income to come in between $60 million and $90 million, a range between a decline of 26% and a rise of 11%.

For all of 2005, Amazon slightly raised its guidance on operating profit but kept revenue guidance little changed. The company expects sales to be between $8.28 billion and $8.68 billion (up from previous guidance of sales between $8.18 billion and $8.68 billion) and operating income between $415 million and $515 million (compared with the previous range of $395 million to $510 million).

TheStreet.com has a revenue-sharing relationship with Amazon.com under which it receives a portion of the revenue from Amazon purchases by customers directed there from TheStreet.com.