Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Amazon's quarterly profit and revenue topped analysts' expectations by a wide margin as the Prime loyalty program helped the online retail giant attract more customers and revenue surged in its cloud services business.

Shares of the world's biggest online retailer jumped nearly 13 percent to $679 in extended trading on Thursday.

Amazon has seen strong growth in subscribers to its Prime loyalty program, which offers one-hour delivery, original TV programming and access to its digital entertainment products such as Prime Music and Prime Video for an annual fee of $99.

The company recently launched a monthly subscription to the program for $10.99. Amazon has also said it plans to offer its video streaming service for a monthly fee of $8.99.

Amazon's net sales in North America, its biggest market by revenue, increased 26.8 percent to $17 billion in the first quarter.

Revenue from its cloud services business, Amazon Web Services, surged 63.9 percent to $2.57 billion. The unit, Amazon's fastest growing business, is seen as the next driver of growth for the company.

Amazon reported net income of $513 million, or $1.07 per share, for the quarter ended March 31. The company had a loss of $57 million, or 12 cents per share, a year earlier.