NEW YORK (AP) – Online juggernaut Amazon is buying Whole Foods in a deal valued at about $13.7 billion, including debt.

Amazon.com Inc. will pay $42 per share for Whole Foods Market Inc.

That marks an 18 percent premium to Whole Foods closing price on Thursday.

The deal 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.