Amazon.com (NASDAQ:AMZN) has been a thorn in the side of the rest of the retail industry for some time now. The online retailer's competitive pricing and attractive Prime membership benefits have resulted in steady increases in revenue for Amazon while competitors like Wal-Mart (NYSE:WMT) retool and struggle to keep up with inflation.

But the competition may be starting to turn the corner. Wal-Mart posted a 63% increase in online sales in the first quarter. While its string of e-commerce acquisitions headlined by Jet.com certainly helped, management says the majority of growth came from Walmart.com.

But one quarter of good results shouldn't scare Amazon investors. The company is still at the forefront of an ongoing megatrend, and its share of the online commerce market is only getting bigger.

A woman working in one of Amazon's warehouses.

Image source: Amazon.

The megatrend fueling Amazon's growth

Online sales continue to chug along at a mid double-digit pace year after year. From the end of 2009 through the end of 2016, U.S. online sales grew at an average rate of 15.9%, according to data from the U.S. Census Bureau. Growth was remarkably steady as well, ranging between 14% and 18.5% during that period. There are no signs of a slowdown either. In fact, sales growth accelerated last year from 14% to 14.8%.

Amazon is particularly well positioned to capitalize on the growth of e-commerce. 55% of online shoppers begin their product search on Amazon.com, according to a survey by BloomReach last fall. Importantly, that number is climbing, up from 44% the year before.

With top line growth outpacing the overall growth of online sales, it's clear Amazon is grabbing market share even as the market leader. Last year, Amazon accounted for 43% of online sales in the U.S. and 53% of the growth in online sales, according to data from Slice Intelligence.

And there's a big security blanket on Amazon that means those numbers probably aren't going anywhere.

Amazon Prime is a huge moat, and nobody's crossing it

It might sound dumb, but the reason so many shoppers are starting their product searches on Amazon is because they'd prefer to buy things from Amazon. That's because they're probably a member of Amazon Prime, which includes unlimited two-day shipping on over 50 million items.

There's not really an alternative in online retail. Wal-Mart introduced free two-day shipping on orders over $35 earlier this year after its $50 per year ShippingPass program failed to compete with Prime. Still, there's a minimum order requirement and it only applies to 2 million items on Walmart.com.

Amazon has attracted over 80 million Americans to Prime, according to the Consumer Intelligence Research Partners. Globally, that number is even bigger.

Amazon is investing heavily in benefits to lock Prime members into the program. From video and music streaming rights to Prime-exclusive items, the value of Amazon Prime continues to improve.

What's more, Amazon is taking steps to increase Prime membership by making it easier to afford for those that need it. It started offering monthly payment plans last year, and it announced plans to offer discounts for customers on government assistance earlier this month. That's a direct appeal to one of Wal-Mart's prime target demographics.

Prime membership growth isn't showing any signs of slowing down. As Amazon invests in new benefits and makes it easier for everyone to afford, there's a long runway for growth, especially internationally. As online retail continues booming, Amazon is well-positioned to continue grabbing share of the market even as competitors like Wal-Mart keep trying to pick away at it.

Adam Levy owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool has a disclosure policy.