JOHANNESBURG - In 2011, U.S. retail giant Walmart Inc made a bet on Africa, buying a majority stake in South African retailer Massmart in what many investors saw as a step toward dominating the continent's vast untapped market.

It didn't go according to plan.

More than a decade later, Massmart's balance sheet is burdened with debt, its books are deep in losses and it's drowning in lease obligations on commercial properties.

From its late entry into e-commerce to an ill-fated foray into fresh foods, Walmart's African journey over the last decade has been a string of missteps, compounded by economic headwinds and the COVID-19 pandemic.

But instead of walking away, as it has from failures in Britain and Germany, Walmart is doubling down with a plan to take full control of its African problem child, which it unveiled in August.

The strategy - according to nine analysts, investors and sources with direct knowledge of Walmart's plans - is firstly to build Massmart into a force able to see off its brick and mortar rivals and then win a looming battle against Amazon for the future of African e-commerce.

"Walmart plans to bring its entire e-commerce enterprise and expertise into Massmart," said a source close to the buyout plan. "Big investment is required to keep it relevant."

De-listing, the source told Reuters, will allow Walmart to make direct capital injections and swallow more losses without pressure from impatient Massmart shareholders, who have not received dividends in three years.

The prize: the world's last, largely untapped retail market, boasting a billion consumers and growing household spending.

"We continue to see opportunity in Massmart and the impact the business can have, providing people across the region with greater access to goods and services they want," Walmart International President Judith McKenna said in response to emailed questions this month.

She did not provide further details on the company's strategy in Africa.

FROM PARADIGM TO TURNAROUND

Not everyone is convinced.

"Walmart's entry was going to be a new paradigm for African consumers," said the source close to the buyout. "But that didn't happen."

Instead, Massmart's units outside South Africa struggled with foreign exchange risk, tricky regulatory environments and macroeconomic volatility.

In South Africa, meanwhile, competitors upped their game, said Jean Pierre Verster of Protea Capital Management, which manages funds with exposure to Massmart shares.

"Walmart realised that other retailers in South Africa - the likes of Shoprite, Pick n Pay et cetera - are very astute retailers and they can't just push them over," he said.

Game - Massmart's underperforming general merchandise business, which sells everything from furniture to cellphones - was slow to develop an e-commerce offering, leaving it unprepared for a pandemic-induced boom in online shopping. And supermarket rivals handily fended off its push into fresh and frozen food.

Former South African President Jacob Zuma's nine-year corruption-plagued tenure, meanwhile, tanked consumer sentiment.

By 2019, Massmart was loss-making. When COVID-19 struck, Walmart was forced to pump in 4 billion rand ($219 million).

Since Walmart, which tops the Fortune 500 ranking of U.S. companies by revenues, first announced plans to buy into the South African retailer in 2010, Massmart's share price has dropped 60%.

"The more disappointing part is not just the fact that they didn't make it in Africa," said Achumile Mashalaba, an analyst at South African fund manager Ninety One, which does not hold Massmart shares. "They've gone backwards."

WHAT NOW?

In August, Walmart launched a 6.4 billion rand ($350 million) bid for the 47% of Massmart shares it does not already own, valuing it at a premium of over 50%.

Going forward, according to a source in contact with Massmart management, Walmart's brick and mortar focus will likely be on wholesale merchandiser Makro and hardware chain Builders - Massmart's two better-performing brands.

Massmart is already planning an expansion to capture more of South Africa's 455 billion rand wholesale and home improvement markets. Then there's the Game headache.

After starting the process of closing stores in East and West Africa this month, Walmart must now decide on the future of Game's loss-making South African business.

Its big bet, however, will be on e-commerce.

"Our strategy consists in creating and expanding an e-commerce offer for all three formats - Game, Builders and Makro," Walmart said in response to emailed questions.

Just 2.2% of Massmart's sales came from online retail in 2021 due to the company's late start and Africa's relatively underdeveloped market. By comparison, of Walmart International's nearly $101 billion in total net sales, $18.5 billion were related to e-commerce.

Recent acquisitions of on-demand marketplace OneCart and delivery company Wumdrop may help. Massmart has also started leveraging Walmart's group-wide e-commerce infrastructure.

Earlier this year, an internal Amazon.com Inc memo detailing its expansion plans, including a maiden foray onto the continent via South Africa, leaked to media.

The pending battle with its global rival looms over Walmart's e-commerce strategy for Massmart, several shareholders told Reuters.

"Amazon is coming and competition in that market is only going to intensify," said Marlo Scholtz, portfolio manager at Sanlam Investments, a leading Massmart shareholder.

"So you need to be there and be there early."

Amazon declined to comment for this story.

While Walmart lags behind Amazon in U.S. e-commerce market share, it's been more successful against the world's largest e-commerce retailer in China and India.

Africa may indeed present Walmart with another growth opportunity. But don't expect an immediate continental contest, said a source involved in Walmart's initial Massmart stake acquisition.

"Walmart needs to get South Africa right," he said. "If it is going into Africa, it is going to go to Africa very slowly."

Africa's e-commerce potential is a tough nut to crack. Logistics - from warehousing to last-mile delivery - represent a major hurdle in cities that often lack street names or house numbers. And, despite the official establishment of the African Continental Free-Trade Area in 2019, cross-border trade within the continent remains cumbersome and expensive.

While Walmart can now firmly set the direction at its South African unit, its track record outside the United States is spotty. Success stories in markets like Mexico are offset by struggles in others, including Europe, South Korea and Japan.

"To believe Walmart will be successful in markets outside the U.S. requires believing that what's important in the U.S. is the same thing as what's important abroad," said David Klink, senior equity analyst at Huntington Private Bank, which holds more than $45 million in Walmart shares.

"That's not always the case."

($1 = 18.3035 rand)

(Reporting by Nqobile Dludla in Johannesburg, additional reporting by Promit Mukherjee in Johannesburg and Arriana McLymore and Siddharth Cavale in New York Editing by Joe Bavier and Daniel Flynn)