This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Walmart is in the biggest fight of its 68-year history.

To stave off Amazon and remain the world’s biggest retailer, Walmart is stepping up its grocery game and buying trendy digital brands. The company is redesigning its stores and building up its online assets.

“We’re changing. We’re adapting. We continue to transform,” chief executive Doug McMillon said at Walmart’s annual investor gathering on Tuesday.

Walmart (WMT) is marching forward with a two-track strategy designed for different customer segments: It’s offering cheaper and more convenient ways to buy groceries for its low-and-middle income base, while acquiring high-end brands— including Bonobos and Modcloth— to draw wealthier shoppers long wary of Walmart’s image.

The plan is working: Grocery sales growth is at a nine-year high. Walmart’s online sales are expected to grow 40% this year, and the company said Tuesday that digital growth will expand by 35% in 2019.

“They are one of the few incumbents that has effectively landed some counter punches on Amazon,” said Jason Goldberg, head of the commerce practice at digital agency SapientRazorfish.

Food fight

The company believes its 182,000-square-foot supercenters are its most effective weapon against Amazon (AMZN). Amazon bought Whole Foods last year, but it can’t easily replicate an expansive brick-and-mortar presence across the world.

Walmart’s proximity to shoppers’ homes gives the company a leg up over its rivals in the grocery race. About 90% of Americans live within 10 miles of a Walmart.

Groceries are the biggest traffic driver to Walmart’s stores. They make up 56% of its roughly $500 million in annual sales.

Under McMillon, the company has bolstered the quality of its fresh grocery selection and invested in private-label brands, including Great Value and wine labels. Walmart has also lowered prices to compete and upgraded its supply chain to keep groceries fresher for longer. emphasized keeping shelves fully stocked.

In 2014, Walmart introduced curbside pickup. Shoppers can order online, select a pickup time, and pick up their groceries at thousands of stores without leaving their cars. Walmart has 25,000 trained “pickers” who select produce and meat for online orders.

Retail experts say that option is more appealing to shoppers who drive to grab their groceries and don’t have time to wait at home for them to arrive.

By the end of 2019, curbside pickup will be available at 3,100 Walmart supercenters and neighborhood markets. Whole Foods has only about 470 stores and it appeals to a narrow segment of the grocery market.

Walmart is marshaling its real estate in other ways, too. It will have 700 store pickup towers — automated vending machines to retrieve online orders — by the end of the year.

The company is testing a variety of first-and-third-party services to handle deliveries, including Spark, a crowd-sourced platform. The company will be able to cover 40% of the US population through delivery by the end of the year.

Although online delivery still makes up a fraction of the estimated $800 billion US grocery market, Walmart is taking steps to prepare for the future.

Climbing upmarket

Protecting groceries alone isn’t enough and building new stores won’t cut it anymore.

Walmart is only adding 10 stores next year in the United States after saturating the country with 182,000-square-foot supercenters. So Walmart is attempting to bring wealthier Americans into the fold with more income to spend on clothes, everyday essentials, and home goods.

Walmart dominates lower-income consumers, who make up 30% of the $4 trillion retail market the two are battling over, according to a Morgan Stanley data analysis.

But Amazon is winning in the higher end, which represents half of the available market.

Walmart has developed a shrewd acquisition strategy to reach those wealthier customers and chip away at Amazon’s advantage.

Instead of betting on the Walmart name, the company is buying brands like Bonobos and online specialty stores such as Moosejaw, Hayneedle, and Shoebuy. In October alone, Walmart nabbed plus-size digital brand Eloquii and lingerie retailer Bare Necessities.

Walmart also has a new, modern-looking website. It has added more than 2,000 brands to the site in areas ranging from kitchenware to outdoor clothing.

The redesigned page not only helps Walmart appeal to wealthier customers, but convinces top brands to sell on it. For example, on Tuesday, Walmart announced a partnership with Advance Auto Parts for a dedicated page on

To appeal to city shoppers, Walmart has rolled out a relaunched, the online marketplace it bought two years ago from Lore for $3.3 billion.

“We really wanted to position and push it more upmarket — really focus on the higher-income urban Millennials,” said Marc Lore, Walmart’s head of US e-commerce, on Tuesday. Jet is attracting premium brands like Nike to the site. It will start selling Bonobos clothes there next week.

Bringing startups into the Walmart ecosystem also expands the company’s talent pool and expertise as it tries to reach tech-savvy shoppers.

For example, Andy Dunn, the founder of Bonobos, now runs Walmart’s online brand portfolio. Bare Necessities CEO and co-founder Noah Wrubel will lead and Jet’s intimates category.

“When they make acquisitions, they do it a great deal for the intellectual capital they can build around it,” said Alan Ellstrand, associate dean of the Walton College of Business at the University of Arkansas.

All roads lead to Amazon

The challenges Walmart faces are steep and expensive.

It lowered its profit guidance on Tuesday for 2019, citing its $16 billion acquisition for a controlling stake of Indian startup Flipkart. The deal, the largest in Walmart’s history, will position the company to take a bigger slice of India’s fast-growing online retail market. Amazon was reportedly the next-highest bidder for Flipkart.

Walmart’s investments to ramp up online will also dent the company’s profit margins. “We expect losses to increase some next year,” CFO Brett Biggs said on Tuesday.

The company is far behind Amazon on building out its online shipping capabilities: It operates fewer than 10 dedicated e-commerce facilities, compared to Amazon’s 122 core fulfillment centers, Morgan Stanley’s Gutman noted.

Goldberg, from SapientRazorfish, questioned whether Walmart has the agility and speed to disrupt itself in time to stave off Amazon.

Walmart has an entrenched supply chain and a distribution model that allowed it to become the world’s largest retailer, but that same infrastructure makes it challenging to pivot.

“My main concern about Walmart continues to be competition from Amazon,” said Ellstrand. “While Walmart continues to innovate in the online space through the acquisitions it has made, its platform continues to trail Amazon.”