Amazon has turned malls upside down, but had left grocery stores unscathed.

That changed on Friday.

Amazon's $13.7 billion purchase of Whole Foods means the supermarket, and retailing overall, will never be the same. Grocers will now have to contend with the incredibly rich and powerful competitor whose impact on retail has been so dramatic.

Department stores have shed 46% of their workers since 2001, a greater percentage of their jobs than coal mines or factories have lost over the same period. Store closing announcements are piling up at a record pace.

And retail bankruptcies large and small are up 30%, according to BankruptcyData.com. They have included well known names across many sectors: Gymboree, Sports Authority and Payless Shoes have all filed for bankruptcy within the last year.

Sears, the iconic chain that reshaped retailing over the last 100 years, warned earlier this year there is "substantial doubt" it can stay in business.

Related: Jeff Bezos is the smartest guy in business

The grocery industry hasn't been immune -- old-line supermarket chain A&P went bankrupt in 2015. But for the most part, threats to grocers has come from brick-and-mortar retailers entering the sector: Walmart (WMT), Target (TGT) and Costco (COST) are now major forces in grocery.

And while department stores, electronics chains and other retail sectors have been closing stores, the number of grocery stores has continued to grow. It wasn't until 2015 that the number of pure grocery stores actually started to decline, according to government numbers, and then only slightly.

Only about 2% of about $600 billion in annual grocery sales are made online, according to Daphne Carmeli, CEO of Deliv, which handles same-day delivery for more than 4,000 retailers, including grocers.

"The anticipation was that grocery will go to about 20% online in the next couple of years," she said. "But grocers have to respond and move faster now. Because that's what Amazon (AMZN) does. They get into a field and, boom, they get market share and become the leader."

The Whole Foods acquisition is also scary for grocery workers. Amazon is a leader in the use of robots.

Grocers have been trimming jobs through innovations like self-service checkout lanes. Amazon is experimenting with a store in its Seattle hometown where customers will buy groceries without even having to go through a checkout line, using an app and computer vision. Labor leaders voiced concern Friday that Amazon's move into the grocery sector will cost even more retail jobs.

But an Amazon spokesman said it does not plan on using its checkout line-free technology in Whole Foods, and that the purchase is not expected to cost any jobs.

Related: What the Amazon-Whole Foods deal means for you

The coming years are likely to see a lot of disruption, not only from Amazon but from traditional grocers shifting more sales online. But given its technological advantages, Amazon is expected to have an oversized impact.

"Amazon will redefine convenience," said Bahige El-Rayes, a principal in the retail practice of A.T. Kearney.

The growth of online grocery shopping has faced barriers. Consumers want to look at food, especially meat and produce, before they buy it.

But part of the problem has also been the need for short delivery distances for perishable items. While Amazon has been building more and more delivery hubs, the Whole Foods deal gives it 456 stores that it can instantly fit into that network, said Josh Olson, analyst with Edward Jones.

"It potentially turns these brick and mortar stores into distribution centers," Olson said.