Bezos to Wall Street: I told you so.

Amazon seems to be once again proving the naysayers wrong.

Back in the dot-com boom, CEO Jeff Bezos piled on debt to build the biggest online retailer, one designed to keep customers happy. People said it would drive Amazon to an early bankruptcy, but the company turned a profit in 2002 and has stayed in the black since. They said the company would never be more than a glorified retailer, but dozens of startups are using its Web services as a utility-like lifeline for their incubation.

When those criticisms were pushed aside, the naysayers said Amazon Prime was a brick tied to its potential profits, and that it would never drive revenue growth through customer loyalty as Bezos had promised. They also said that the company’s focus on free cash flow was a distraction against the ever shrinking operating margins that would drive Amazon back to a loss someday.

Bezos has pretty much refuted those last two points in the conference call Tuesday announcing the company’s stellar second-quarter earnings. Amazon’s revenue came in at $2.89 billion, up 35% from a year earlier. Net income ballooned to $78 million, or 19 cents a share, from $22 million, or 4 cents a share, in the same quarter a year ago. Analysts had been looking for revenue of $2.81 billion and a profit of 16 cents a share, so the numbers came in well ahead of what Wall Street had been expecting.

As for the free cash flow figure Amazon has trumpeted for so long, it nearly doubled to $700 million in the quarter, from $375 million in the second quarter of 2006. That suggests the strong rise in profit is coming from a healthy business operation, not buttressed by one-time gains or money made from interest or other investments. And it increased cash flow while pushing up operating margins, to 4% in the quarter from a rather abysmal 2.2% a year earlier.

For years, Bezos’ game plan was to focus on low prices and fast delivery, even if it drove up costs in the near term. He’d talk over and over about the importance of the customer experience, and it might have been another mantra turned cliche except for the amount of money he was willing to put behind it.

In February 2005, Bezos introduced Amazon Prime, which promised free two-day delivery (and a big discount on overnight shipments) for a $79 a year subscription. At first, Amazon’s customers seemed to be cold to the program, but over time it seems to have prompted old customers to become much more active customers – a necessary trend since Amazon’s growth in new customers was flattening out.

It’s working so well that Amazon’s North American sales are growing faster than international sales – a sort-of role reversal for most of the U.S. Internet giants. U.S. sales grew 38% to $1.6 billion in the quarter, while international sales grew 38% to $1.3 billion.

Analysts on the conference call seemed to accept this gap as evidence that Bezos has successfully reinvigorated growth at Amazon’s core market. He said the fast growth in its home market was driven by demand for lower priced products delivered quickly – a payoff to his master plan all along. Now Amazon is launching Amazon Prime abroad, starting with Japan.

Amazon’s stock, which has been volatile lately in the manner of speculative stocks, rocketed up 18% in after-hours trading from its official close Tuesday of $69.25. That leaves the stock as expensive as ever, but investors who had bought into the stock in recent months, despite its high valuation, are seeing some payoff now.