Supermarket stocks and shares of companies that sell groceries are now spoiled in the eyes of investors after Amazon announced a nearly $14 billion purchase of Whole Foods Market on Friday.

Following Amazon's move to plant a bigger stake in the food-selling business, shares of Walmart tumbled 4.6%, making it the biggest loser in the blue-chip Dow Jones industrial average. Walmart, the world's biggest retailer that generates more than half of its revenue from groceries, lost more than $11 billion in market value.

Amazon's move is a threat to supermarket chains like Kroger, fresh produce retailers like Sprouts Farmers Market, big-box retailers like Walmart and Target that have moved aggressively into groceries, and companies like Costco that sell bulk products, including food, at discounted prices.

"The entry of the king of web retail into the food space has to rattle the other companies," said Brad McMillan, chief investment officer at Commonwealth Financial Network.

%INLINE%

Companies in the food business, he adds, are also under attack from another recent entry into the U.S. grocery pace, German grocer Lidl. "Both global players maximize efficiencies ... which probably portends price wars," McMillan said.

Shares of Amazon rallied 2.4 percent. Whole Foods Market, which has more than 420 stores in more than 40 states in the U.S., soared more than 29.1 percent to $42.68. Amazon is paying $42 per share for Whole Foods, which is a 27 percent premium from Thursday's night close.

Amazon, known for its low prices and selling virtually everything, including groceries, will likely take market share from competitors and hurt their profit margins if they have to lower prices to compete.

Amazon's deal also gives it a brick-and-mortar footprint around the U.S.