(Reuters) - Amazon.com Inc (AMZN.O) shares surged more than 17 percent on Thursday as the online retailer posted an unexpected quarterly profit, pushing its market value above that of Wal-Mart Stores Inc (WMT.N), the world's largest retailer.
Amazon also forecast third-quarter revenue above estimates, and reported strong sales in North America, and unprecedented growth in its popular Prime two-day unlimited shipping service.
Prime, which for $99 a year also provides exclusive access to certain movies, music and Kindle books, is getting new subscribers at rates "higher than we've ever seen," Chief Financial Officer Brian Olsavsky told analysts on a conference call.
Membership was growing faster outside the United States than inside, helped in part by its recent one-day sale event called "Prime Day," Amazon noted. But it declined to disclose membership figures.
"Growth has been fueled in large part by Prime growth and also (item) selection growth so it's been a huge driver both in North America and international segments," Olsavsky said in a separate call for reporters.
For the second quarter, sales in North America, the company's biggest market, rose 25.5 percent to $13.8 billion in the second quarter from a year earlier, helped by strong demand for electronics and general merchandise.
Revenue from the company's cloud computing division, Amazon Web Services, soared 81.5 percent to $1.82 billion, accounting for nearly 8 percent of the quarter's revenue, it said on Thursday.
Shares of Amazon, which began as an online bookstore 20 years ago, jumped more than 17 percent to $566.02 after the Seattle-based company reported results. If the stock maintains this level on Friday, Amazon's market value would well exceed Wal-Mart's $233.52 billion.
Amazon declined to comment on rising competition from new online retailers like Jet.com, which offers annual memberships at half the price of Amazon Prime and promises savings on 10 million products.
Jet, which has so far raised $220 million from top venture capital firms, will list its discounted prices next to Amazon's lowest price for the same products.
"We've been in competition with some of the biggest names in retail," Olsavsky said, "so we're used to competition but we're focused on the customer."
"It looks like they beat across every major revenue line," said Colin Sebastian, analyst with Robert W. Baird & Co. "That, along with the surprise profit beat, is icing on the cake, so to speak."
The company forecast net sales would grow 13 percent to 24 percent, to a range of $23.3 billion to $25.5 billion, in the third quarter, well above analysts' consensus estimate of $23.89 billion according to Thomson Reuters I/B/E/S.
Amazon estimated an operating loss of $480 million to an operating income of $70 million for the third quarter.
Amazon reported a profit of $92 million, or 19 cents per share, for the second quarter ended June 30, compared with a loss of $126 million, or 27 cents per share, a year earlier.
Revenue rose 19.9 percent to $23.19 billion.
Analysts on average had expected a loss of 14 cents per share on revenue of $22.39 billion.
Reporting by Anya George Tharakan in Bengaluru and Mari Saito in San Francisco; Editing by Stephen R. Trousdale and Richard Chang