Amazon shares have surged more than 18% in after-hours trading after it reported a surprise profit and better-than-expected sales figures that value the online retailer higher than Walmart for the first time.
The online retail giant reported a $92m profit compared to a $126m loss for the same period a year ago.
Sales also rose 20% to $23.2bn in the second quarter to the end of June, boosted by strong growth in the US.
Its shares, which fell 1.3% during the day, leapt 18.5% to $571.24 a share in after-hours trading on Wall Street.
The online retailer says its Prime programme and cloud computing services pushed growth up, making it worth more than Walmart.
The jump meant Amazon was valued as high as $267bn (£172bn), eclipsing Walmart’s market value by $32bn (£21bn).
Amazon said its Prime service helped drive growth in the quarter.
It held its first Prime Day on 15 July with an exclusive sale targeted towards those customers who in the UK pay £79 for the privilege of, among other things, unlimited free deliveries.
More new members tried Prime worldwide than any single day in Amazon’s history with customers purchasing more units on Prime Day than on Black Friday 2014.
Amazon, which celebrated its 20th birthday on 16 July, started life in a garage in Seattle.
Initially an online bookstore, it has since diversified into cloud computing services which it also credited for the strength of sales in the quarter to the end of June.
The Amazon Web Services division (AWS), which provides a suite of services and products that allows users to access applications on any machine with an internet connection, saw revenues jump 81% to $1.8bn (£1.2bn).
Amazon shares have risen 55% so far this year. They closed regular trading on Thursday at $482.18, an increase of 35% over the last 12 months. After the earnings were revealed last night, shares jumped and settled up $85.54 at $567.72 in after-market trading.
According to Bloomberg, Amazon’s founder and chief executive Jeff Bezos is worth $43bn (£28bn).