Consumers flocked to Whole Foods in droves after the organic grocery chain slashed prices by as much as 43 percent after its $13.7 billion sale to Amazon (AMZN), according to an analysis of mobile phone location data by research firm Thasos Group.

Thasos found that foot traffic to Whole Foods, which had been mocked for years as "Whole Paycheck" because of its high prices, rose 17 percent during the week of the price reductions beginning on Aug. 28. As of the week of Sept. 16, growth had decelerated to 4 percent compared with 2016, though it remained elevated compared with the three weeks proceeding the price cuts.

Seattle-based Amazon gained customers at the expense of its rivals in the cutthroat grocery market. According to Thasos, nearly 25 percent of the new Whole Foods customers came from Walmart (WMT), the largest U.S. seller of groceries. Another 16 percent came from Kroger (KR), the No. 1 operator of conventional supermarkets and 15 percent came from warehouse retailer Costco (COST).

"The new customers Whole Foods attracted with its price reduction were the wealthiest regular customers of the competing stores," according to Boston-based Thasos. "The price reduction did not attract a lower-income demographic or incentivize longer driving times to reach [a] Whole Foods store."

Get Breaking News Delivered to Your Inbox

For Whole Foods' smaller rivals such as Trader Joe's and Sprouts, the news is even worse. During the first week of the price cuts, Tasos found that 10 percent of Trader Joe's regular customers who shopped at least twice a month defected to Whole Foods compared to the previous week. For the period of Sept. 11 to Sept. 16, the Trader Joe's defection rate was 6 percent. Target's (TGT) customer base shrunk by 3 percent.

But Amazon's rivals aren't just sitting around watching customers leave their stores.

Walmart is ramping up a service that gathers groceries that customers order online and brings them to the store's parking lot. It's testing another offering that would deliver food directly into a consumer's refrigerator even when they're not home.

Target also is revamping its moribund $15 billion grocery business under a new management team. And both Kroger and Costco have been beefing up their online businesses.

Ironically, as its rivals expand their digital footprints, Amazon is test-marketing a prototype for a small market called Amazon Go that operates without checkout lines. The company also has a dozen physical bookstores and plans to open three more soon.