In this Wednesday, Sept. 27, 2017, file photo, an Amazon Echo Dot is displayed during a program announcing several new Amazon products by the company, in Seattle. Amazon.com, Inc. reports earnings Thursday, Feb. 1, 2018. (AP Photo/Elaine Thompson, File)

It was a prime holiday season for Amazon: The online retailer's quarterly profit soared past $1 billion for the first time in its more than 20-year history as it sold more voice-activated gadgets, enlisted new Prime members and benefited from its recent purchase of Whole Foods.

The Seattle-based company's profit was also helped by recent changes to the tax law, giving it a $789 million tax benefit during the fourth quarter.

Amazon, which got its start as an online bookstore in 1995, has ambitions that go far beyond online retailing. This week, for example, it announced plans to create a new health care company with JPMorgan Chase and Warren Buffett's Berkshire Hathaway to find a lower cost solution for the three companies' employees.

It also sees its Alexa voice assistant as a big part of its future. Amazon has been striking deals to put Alexa in cars, refrigerators and alarm clocks, allowing users to ask it the weather or shop on Amazon.com by voice. Amazon said Thursday that it sold "tens of millions" of its Alexa-enabled Echo devices last year, but didn't give specific numbers.

Amazon founder and CEO Jeff Bezos said Alexa "far exceeded" the company's expectations.

"We don't see positive surprises of this magnitude very often—expect us to double down," said Bezos, who will appear in a Super Bowl commercial this weekend that promotes Alexa.

Overall, Amazon reported net income of $1.9 billion, or $3.75 per share, in the three months ending Dec. 31. That blew past the $1.88 per share analysts expected, according to FactSet. Its profit was more than double the $749 million it reported in the same quarter a year ago.

Revenue soared 38 percent to $60.5 billion in the fourth quarter, beating the $59.8 billion analysts expected. Nearly 70 percent of its revenue came from online shopping and sales of its products, with the rest coming from services, such as the cloud-computing services it sells to businesses.

In this Monday, Jan. 22, 2018, photo, a shopper walks past others in a long line waiting to get inside an Amazon Go store in Seattle. Amazon.com, Inc. reports earnings Thursday, Feb. 1, 2018. (AP Photo/Elaine Thompson)

The company said its physical stores brought in revenue of $4.5 billion, mostly from Whole Foods.

Although the company has more than a dozen bookstores, Amazon's first big push into physical stores came in August when it completed a nearly $14 billion deal to buy the organic grocer and its 470 stores. Amazon was quick to make changes, slashing prices on yogurt, bananas and organic kale. It also started selling Echos and Kindle tablets near the grocer's produce.

Amazon executives said in a conference call Thursday that sales at Whole Foods were better than expected. They also said the company will make its Prime membership the grocer's loyalty program sometime later this year.

Amazon's headcount also swelled. The company had 566,000 employees at the end of last year, up 66 percent from 2016. Some of that growth came from Whole Foods and its 89,000 employees, but the company said it also hired nearly 130,000 people around the world last year.

The company, which has outgrown its Seattle headquarters, is in the process of selecting a place to build a second headquarters. It has narrowed down its options to 20 places after receiving 238 proposals from cities, states and regions in North America hoping to win over the fast-growing and its promise to add 50,000 jobs and spend $5 billion in construction.

Looking ahead, Amazon said it expects first-quarter revenue between $47.75 billion and $50.75 billion. Analysts expected first-quarter revenue of $48.6 billion.

Amazon.com Inc.'s stock, which is up more than 22 percent so far this year, jumped 6 percent to $1,477 in after-hours trading Thursday.