The sun never sets on Walmart Inc.’s empire, thanks to its network of stores across five continents. But in the span of 10 days, chief executive Doug McMillon has begun dramatically redrawing the retailer’s map, and there’s likely more to come as it places bets to remain on top.

“All of a sudden, everything is in play,” said Dave Marcotte, an analyst at Kantar Retail.

In less than two weeks, Walmart has agreed to cede control of its British business to a competitor and spend $16 billion to acquire India’s e-commerce leader in its biggest-ever deal, fending off Amazon.com Inc. The wheeling and dealing show how McMillon is focusing on high-potential markets like China and India, finding partners to help it battle online and cutting loose middling businesses. He’s got more work to do, though, and subpar markets like Brazil and Japan might be next on his list.

Walmart’s far-flung international units don’t get much attention, but they’re important as a source of cash, management talent and ideas that percolate into its core U.S. operations. Sales growth outside the U.S. once topped more than 10 percent annually, adjusted for currency moves, but it’s less than half that now as sluggish economies, store closures and fierce competition have taken their toll.

Those pressures, combined with a US e-commerce business that continues to spill red ink and higher labor expenses from this year’s wage hike -- have forced McMillon into hard choices. Some, like selling the British Asda stores, were welcomed by Wall Street, but Wednesday’s deal got a rude welcome from investors, who raised concerns about Flipkart’s steep losses and asked whether Walmart’s cash would be better spent elsewhere. S&P Global Ratings said the heavy spending to compete with Amazon could threaten Walmart’s pristine credit rating. Related: The CEO Who Helped Deliver India’s Online Shoppers to Walmart

McMillon defended the Flipkart deal to analysts, saying it was a unique opportunity. He’s certainly mindful of past missteps abroad, such as his 2011 decision to buy an unprofitable, second-tier online marketplace in China that’s forced the company to play catch-up to Alibaba, the Amazon of China, ever since.

Walmart’s international reach sprawls across 6,360 stores in about two dozen countries from Argentina to Zambia. Many were acquired during a buying spree from 1999 to 2009, but that era of aggressive flag-planting is long over. Today the international business accounts for less than one-quarter of Walmart’s total revenue, down from nearly 30 percent five years ago.

That share will decline further after Walmart’s decision to merge its Asda business in the U.K. with Sainsbury Plc, retreating from a market that was once its shining star abroad. Other moves are expected to follow, as the Asda sale “was the first volley” in a broader reshuffle of Walmart’s global holdings, said Mark Stoeckle, portfolio manager of the Adams Diversified Equity Fund, which owns Walmart shares.

Stoeckle and other investors were encouraged when Walmart’s finance chief, Brett Biggs, said in October that he’s “open to taking action” to simplify operations. Getting leaner should help Walmart devote more focus and firepower to its escalating battle with Amazon, which is trying to crack categories like food and apparel, long Walmart strongholds. Acquiring e-commerce startup Jet.com two years ago has helped, but the Flipkart deal suggests that future moves will likely come outside the U.S.

Related: Walmart’s $16 Billion India Investment Hits Waltons’ Fortune

In Brazil, a nation just coming back after a two-year recession and political unrest, Walmart has already closed stores, overhauled management and wound down its e-commerce platform. It’s now reportedly considering selling a majority stake in the unit, which includes a dozen different store types that could easily get broken up by a new owner. “Would I prefer they take capital out of Brazil and put that toward battling Amazon? Sure,” Stoeckle said.

Japan is another potential trouble spot. Walmart’s big-box, one-stop shopping model has never caught on there, and today its Seiyu chain sits far behind leaders Seven & i Holdings Co. and Aeon Co., according to data tracker Euromonitor. As with other Asian markets like China and India, success in Japanese retail is more about clicks than bricks. Walmart has taken steps to improve its digital business, teaming with local player Rakuten Inc. earlier this year to revamp its online grocery service.

“The only route they have to grow that market is online,” Kantar’s Marcotte said. Walmart could go further, cutting a deal with Rakuten or another Japanese company that allows it to focus on the online business and lessen its exposure to capital-gobbling traditional stores.

“There’s certainly going to be a bright-light audit on Japan,” said Bill Dreher, an analyst at Susquehanna International Group. “The growth and margins of Seiyu are underwhelming and we could see something smart being done there.”