Online giant Amazon is buying Whole Foods in a deal valued at about $13.7 billion, including debt (all figures in U.S. dollars). Inc. will pay $42 per share of Whole Foods Market Inc. That marks an 18% premium to Whole Foods closing price on Thursday.

The deal, which is targeted to close in the second half of the year, comes a month after Whole Foods announced a board shake-up and cost-cutting plan amid falling sales. The grocery store operator was also under pressure from activist investor Jana Partners.

As of close on June 15, Whole Foods Market’s stock was trading down at US$33.06, but it opened on June 16 at US$42.06 (the stock was halted until 9:50am). Amazon closed up on June 15 at US$964.17 and opened on June 16 at around US$990.

Read: 3 retail businesses with staying power

Whole Foods, known for its organic options, had been facing increased pressure from rivals, including European grocery chain Lidl, which is planning to enter the East Coast market, along with Aldi and Trader Joe’s.

Amazon, meanwhile, has been expanding its reach in goods, services, and entertainment.

Under the deal, Whole Foods will keep operating stores under its name and John Mackey will remain as CEO, with headquarters in Austin, Texas.

The company, founded in 1978, has struggled to differentiate itself as competitors also now offer a plethora of fresh and organic foods, and has said customers may be choosing “good enough” alternatives closer to home.

In addition to other natural and organic grocers, it has cited pressure from restaurant chains, meal-delivery companies and traditional supermarkets such as Kroger.

Read: Behind-the-scenes look at Buffett’s AGM, for more on Amazon’s Jeff Bezos

Industry watchers took to Twitter with their analysis of the deal.

Other grocery stocks plunge

Major U.S. indexes are slightly lower in early trading on Wall Street, but grocery stores and other retailers are plunging on news of the deal.

Kroger dropped 14% early Friday, while Target sank 12% and United Natural Foods sank 20%. In Canada, both Loblaw and Empire Company‘s stocks are down, as of 10am on June 16.

The Standard & Poor’s 500 index fell 3 points, or 0.1%, to 2,429.

The Dow Jones industrial average gave up 16 points, or 0.1%, to 21,342. The Nasdaq composite gave up 19 points, or 0.3%, to 6,146.

Read: Why value investing in back in fashion

Future for Whole Foods?

One thing Amazon has been doing is testing automation technology at a Seattle convenience store that’s currently open only to Amazon employees. The store uses sensors to track items as shoppers put them into baskets or return them to the shelf. The shopper’s Amazon account gets automatically charged.

It’s expected that Amazon could cut potentially costs if this technology gets good enough to deploy at Whole Foods locations.

As Whole Foods has struggled to differentiate itself versus competitors and as its stock has failed to return to 2013 highs, investors have been frustrated. Also, a key measure that retailers look at to gauge their health–revenue at stores open more than a year–has fallen for seven quarters in a row.

Investors have been saddled with a drop of nearly 43% from the start of 2014 through Thursday, while the rest of the stock market marched 32% higher to record heights.

The investment firm Jana Partners said in April that it had built up an ownership stake in Whole Foods because it saw ways to address its “chronic underperformance for shareholders.” Jana had pushed to shake up Whole Foods’ board of directors, among other changes.

In fact, pressure from activist investors got so high that Whole Foods CEO John Mackey told Texas Monthly magazine recently that “they’re greedy bastards, and they’re putting a bunch of propaganda out there, trying to destroy my reputation and the reputation of Whole Foods, because it’s in their self-interest to do so.”

Amazon already offers grocery-delivery services in five markets, but the Whole Foods purchase could let it expand to many more. Amazon also offers grocery shipments elsewhere, but that’s tough with perishable foods.

The deal has the possibility to be “transformative,” Moody’s lead retail analyst Charlie O’Shea said in a note, “not just for food retail, but for retail in general.” The “implications ripple far beyond the food segment, where dominant players like Walmart, Kroger, Costco, and Target now have to look over their shoulders at the Amazon train coming down the tracks,” O’Shea adds.

To date, online delivery of groceries has been tough for any company to pull off because of customers’ concerns about the quality of meat and produce, according to Wedbush Securities analyst Michael Pachter. But if customers know that what they are getting is the same as what they’d get at the local store, they are more likely to try it out.

Pachter notes that even if Amazon gets 20 million members of its Prime loyalty program to pay $15 a month extra for AmazonFresh grocery-delivery service, that’s 20 million not going to traditional supermarkets. He added that these are likely the higher-income households who tend to buy more expensive brands and cuts of meat.

“The conventional grocery store should feel threatened and incapable of responding,” Pachter said.

For their part, Whole Foods executives have tried to highlight what distinguishes the chain. For example, they launched an offshoot chain named after its “365” private label brand, a nod to the popularity of no-frills chains that draw shoppers with low prices. But in February, Whole Foods said it no longer saw the potential for expanding its flagship chain to 1,200 locations, up from about 460 in the United States, Canada and the United Kingdom.

What about Canada?

As The Canadian Press reports, experts say Amazon’s blockbuster deal to buy the Whole Foods supermarket chain poses a threat to Canada’s grocers and could force them to lower prices, enhance technology or boost their e-commerce services.

Moody’s vice-president Mickey Chadha says the move puts grocers on notice that Amazon intends to be a formidable player in the food business and is likely to accelerate consolidation in the supermarket industry.

Mike von Massow, a food economics expert at the University of Guelph, says Amazon could use the 13 Whole Foods locations in Canada to provide more grocery delivery and pickup offerings or roll out its checkout-free grocery store concept tested in Seattle last year.

He says Canadian grocers could drop prices, improve technology or beef up e-commerce to keep pace.

But GlobalData Retail managing director Neil Saunders says investing in such initiatives can be costly and may be unattractive for grocers as they face increasing competition from discount retailers.

Most Whole Foods locations in Canada are concentrated in the Greater Toronto Area and B.C.’s Lower Mainland.