Walmart (NYSE:WMT) was at a crossroads in 2016. It had fallen well behind Amazon (NASDAQ:AMZN) in the online space, and the retail giant had to decide whether it wanted to truly compete.

Would it focus on being the best possible brick-and-mortar chain, or would it make the steep investments needed to be an omni-channel player? It made its decision very clear when it spent $3.3 billion buying Jet.com and putting its CEO, Marc Lore in charge of its U.S. digital operations.

You can argue that the Jet.com purchase was a mistake. That service has been scaled back, but Lore has pushed Walmart into making major changes. The company stopped charging for delivery on orders over $35, and it re-engineered its supply chain to support that.

A woman uses her smart phone at a Walmart pickup tower.

Walmart has added pickup kiosks in many of its stores. Image source: Walmart.

Where will Walmart be in 10 years?

Walmart has made a major pivot and that had to be painful. The company could have been successful -- to a point -- doing what it was doing. Instead, it has tested all sorts of innovations, picking the ones that worked and running with them aggressively.

Some of these are paying off now. Walmart had already been doing things like curbside pickup and grocery delivery when the current crisis hit. The company had also created the ability to use its stores to efficiently fulfill digital orders. That allows it to deliver on its two-day shipping offer.

Walmart does not equal Amazon when it comes to shipping. It has a few million items available for two-day delivery, while the online leader has over 100 million items that are often being delivered in one day.

The difference doesn't matter that much. Walmart has most items that people need quickly, and its selection has steadily grown. Offering that service for free, while Amazon charges $119 per year for Prime, has been enough to lure a strong customer base.

Walmart has performed well, and it's set up for continued growth. CEO Doug McMillon provided some color on that in the chain's fourth-quarter earnings release.

In Q4, we saw strong performance in the U.S. with eCommerce and Sam's Club plus strength in Mexico, India, and China. We started and finished the quarter with momentum, while sales leading up to Christmas in our U.S. stores were a little softer than expected. The new year has started off well, and we look forward to another strong year. We remain focused on providing our customers with the best omnichannel experience from any retailer.

The retail chain made big changes, and that's never easy. As long as it continues to evolve, Walmart looks to remain on top for the next decade and longer.

Winners keep winning

Walmart has made itself an essential resource for its customers. It has already jumped over the highest hurdles. The chain has delivered a true omni-channel mode. Customers can shop online for delivery at home or order at home for in-store pickup. It can deliver same-day grocery orders, allow people to pick up digital orders at in-store kiosks, or offer any combination of ways the customer wants to shop.

The company must stay vigilant, but it has cemented its status as a top retailer across multiple categories. There's no reason to believe that it won't be in as strong a position ten years from now (or well beyond that). That makes the company a smart buy-and-hold investment that can be a cornerstone of your retirement portfolio.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.