When walmart arrived in britain 21 years ago to gatecrash asdas planned merger with kingfisher, local rivals were alarmed by the prospect of going up against the worlds most formidable retailer.

The arkansas-based juggernaut was at the time opening enough new floorspace each year to occupy the entire store estate of j sainsbury or tesco, and its presence threatened to shake up the uk market with the same cut-price efficiency long deployed in its american heartlands.

It was quite sobering to have the worlds biggest retailer turning up on your lawn, recalled terry leahy, who was then running tesco, asdas larger rival. they were five times [our] size.

On the day walmarts takeover of asda was announced, european supermarket stocks shed more than $4bn in market value, noted leigh sparks, professor of retail studies at the university of stirling.

But two decades on, walmart has failed to realise its early ambitions. while asda has hardly been a disaster for the us group it retains a share of about 14.5 per cent of the uk grocery market it has failed to upstage tesco and has instead jostled with sainsburys for the number-two position.

Line chart of  grocery market share (%) showing asda has failed to make in-roads in the uk

After a lengthy attempt to dispose of the uk business including a blocked plan to merge asda with sainsburys walmart unveiled a 6.8bn deal on friday to sell it to private equity group tdr capital and two lancashire entrepreneurs, mohsin and zuber issa.

Walmart will retain a minority equity stake of an undisclosed size in the grocer. judith mckenna, head of walmart international, said the company would continue to learn from asda, whose new owners plan to keep roger burnley as chief executive.

You have to accept the fact that in some markets you can be more successful with a smaller stake if you have the right partners alongside you, she added.

Asda seemed like a good fit for walmart in 1999. not only did the chain cater to low and middle-income households like its us cousin, it also had a sizeable non-food business, including its george clothing line. while its stores were much smaller than walmarts vast us supercenters, they were significantly larger than those of uk rivals.

Column chart of underlying pre-tax profit (m) showing profits at asda

There were also cultural similarities. asdas two leading executives, allan leighton and archie norman, were admirers of walmart and had before the acquisition copied features such as deploying greeters to welcome shoppers.

With a toehold in germany, walmart was expected to use asda as a springboard for a pan-european assault. it was welcomed with open arms by former uk prime minister tony blairs government, which was fond of talking about rip-off britain and the need to reduce prices.

Over the years, however, asda has faded in comparison with walmarts operations in racier markets, such as china and india. today the uk chain, which has 630 stores, is a small contributor to the group, generating $29bn in sales in the year to the end of january 2020, compared with walmarts group total of $520bn.

Walmarts core model of blowing the competition out of the water with massive price differential and huge out-of-town stores never really got delivered, said one top executive in the grocery sector. they misunderstood how hard opening big out-of-town shops is in the uk.

Prof sparks said he believed walmart thought the planning system would open up, so they could expand like they did in the us. that didnt happen, so they had to buy something instead.

But a 2003 proposal to acquire safeway, which would have given asda more scale and exposure to the south of england, was rejected by competition regulators.

If that deal had gone through, they would have been more of a significant challenger, added prof sparks. the acquisition of 146 netto stores in 2010 was seen by many as an expensive consolation.

With a store portfolio tilted towards the north of england and scotland and a value-conscious customer base, asda was exposed to the rise of the german discounters, aldi and lidl, which lured customers with cut-price essentials and hundreds of new stores.

Sir terry said asda tended to rely on the claim that their prices were the lowest. they became a bit of a one-club golfer and when discounters took that club away they had no special proposition to customers.

The rise of online shopping added to pressure on asdas non-food business, while some analysts said its failure to produce a rival to tesco express and sainsburys local was a strategic error.

It missed out on a lot of those local, convenience-type markets that other groceries were able to capitalise on, said neil saunders, managing director of retail at the consultancy globaldata.

He added that asda had gone through a succession of chief executives. they were all good operators, credible characters: you couldnt accuse asda generally of being badly run.

Andy bond, who ran the company for five years up to 2010, rejected the idea that walmart was an overbearing owner. its a loosely rather than tightly held confederation of businesses, he said. the idea that there was an iron fist in bentonville [where walmart is headquartered] is wrong. they wanted strong local management.

Walmart took a total of 1.8bn in dividends out of asda and redeployed some of its best executives elsewhere, although mr bond said it never left its subsidiary short of capital or management. any suggestion they sucked asda dry is completely wrong.

Walmarts ms mckenna said shoppers benefited from its two decades in britain, and not just through lower prices. expanded ranges in uk retail were partly the result of walmarts entry into the market, she added.

While walmart allowed asda to operate at arms length, it used its global scale to achieve better pricing, and imported initiatives such as the scan and go mobile-checkout technology that was first rolled out at its us warehouse business, sams club.

Ms mckenna said the rest of walmart learned from its ownership of asda, particularly online, where the uk market is considerably more developed than the us.

But the group has long set its sights away from the uk, which ms mckenna described as one of the most competitive markets in the world. brett biggs, the groups chief financial officer, said last year that brexit uncertainty had also contributed to a challenging uk market.

Emerging economies with growing middle classes hold greater appeal. in china, walmart has about 400 physical stores and a joint venture with , one of the countrys biggest ecommerce companies. the group has also invested billions of dollars in india, where it controls the online retail powerhouse flipkart.

You can only deploy assets in so many places and do it effectively, said charlie o'shea, lead retail analyst at moodys.

Executives in bentonville are also preoccupied with walmarts battle for retail supremacy with amazon in the us, where it generates about three-quarters of sales. the effort requires substantial investment in ecommerce.

For sir terry, walmarts mixed record with asda is another reminder that retailers face considerable challenges when they venture overseas.

Walmart pulled out of germany in 2006 after it struggled to compete with aldi and lidl and clashed with trade unions. tesco encountered transatlantic difficulties of a different kind with its ill-fated fresh & easy initiative on the us west coast.

Prices are generally lower in the us, but the costs of doing business there are also lower, sir terry noted. its often hard to read across the pricing, and economics, from one geography into another.

Still, walmart is not abandoning the uk altogether and will keep a seat on asdas board. ms mckenna said the minority interest walmart will retain in the uk chain is not out of kilter with its other overseas markets, where the group also has alternative ownership structures.

We are starting to crack the way you do this, which is the flexibility of how you structure ownership in each market, she explained. i think that is really the trick with international retailing.