Walmart (NYSE:WMT) currently offers unlimited grocery delivery for a $98 annual fee in four markets, and this fall, it'll expand that to 200 markets covering 50% of the U.S. population. Delivery Unlimited takes advantage of Walmart's massive physical footprint to take on competing services like Amazon (NASDAQ:AMZN) Prime Now and Target's (NYSE:TGT) Shipt. Prime and Shipt cost $119 and $99 annually, respectively.

Walmart has established itself as a leader in online grocery, and Delivery Unlimited is the next step to solidify that lead. But Walmart's head of U.S. e-commerce noted in a recent interview with Recode that Delivery Unlimited will ultimately expand beyond groceries to include everything sold in Walmart's Supercenters. That could be the factor that pushes more consumers to choose Walmart over Target's same-day fulfillment options or Amazon Prime Now.

Catching up with the competition

Walmart's focus on online grocery has put it ahead of Amazon and Target in that regard, but it's fallen behind on rapid fulfillment of general merchandise sales. The company's made moves recently to speed up its delivery, rolling out its NextDay program to 75% of the country well ahead of schedule. Still, it has some catching up to do.

Target has doubled down on its Shipt delivery service over the past year. First, it expanded the service to include more general merchandise in December, giving subscribers access to more of Target's store inventory. In June, the company gave Target.com shoppers the option to pay for one-time delivery instead of subscribing to the service for a full year. It also integrated Shipt more closely with Target.com, creating a dedicated same-day delivery section of the website. Last quarter, Target noted its same-day fulfillment options -- which include in-store pickup, DriveUp curbside pickup, and Shipt delivery -- accounted for nearly three-quarters of its growth in digital orders.

Likewise, Amazon's management pointed to the shift to one-day Prime shipping as a reason for the acceleration in its online retail sales last quarter. Meanwhile, it continues to expand Prime Now to new markets, capitalizing on its Whole Foods Market footprint.

Walmart has the potential to reach many more customers than Amazon, and even more than Target thanks to its massive number of stores. There's a Walmart store within 10 miles of 90% of the U.S. population. And if Walmart can expand its same-day delivery or curbside pickup options to include the average 144,000 items available in its Supercenters, it'll quickly overtake both Amazon and Target in terms of selection. Amazon, by comparison, says Prime Now customers can order "tens of thousands" of items through its offering.

Taking on Prime

The big challenge for Walmart with Delivery Unlimited is taking on Amazon Prime. There are already over 100 million U.S. consumers with access to a Prime membership, and the idea that they'd pay Walmart another annual fee for access to another delivery program seems unlikely. It's the same challenge Target has faced as it's tried to grow Shipt over the last two years.

Walmart e-commerce CEO Marc Lore believes consumers will see the value of Delivery Unlimited, and it'll first draw customers away from their local supermarket and then replace Prime over time for many consumers. But if that were the case, Target would be spouting about how rapidly Shipt subscriptions are growing. Shipt delivers from Target, local supermarkets, and several national chains, but it still hasn't grabbed the market share Lore is predicting for Walmart's more limited delivery option.

When Walmart has tried to take on Prime in the past, it's failed. It offered an unlimited two-day shipping service for $50 per year before scrapping it and offering faster shipping to all customers for no fee.

Asking consumers, particularly consumers who already subscribe to Prime, to plunk down more cash for another delivery service is a tough sell. That said, the general trend in demand for same-day fulfillment could push more customers to Walmart if it can accomplish Lore's vision of offering everything in its Supercenters with same-day delivery. It'll be a long, tough road, but Walmart needs to determine its next step in digital, because online grocery sales won't continue growing at the same pace indefinitely.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool’s board of directors. Adam Levy owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool has a disclosure policy. This article originally appeared in the Motley Fool.