Amazon played hardball with Whole Foods and won. Thomson Reuters Whole Foods courted seven separate potential deal partners.

The company read a news story about Amazon's interest and reached out after feeling the heat from activist investors.

Amazon played hardball, demanding secrecy and nearly walking away after Whole Foods made a $45-per-share counteroffer.

The day that Amazon and Whole Foods announced their $13.7 billion merger that shook the grocery industry, a giddy John Mackey couldn't hide his enthusiasm.

The grocer's CEO regaled a crowd of his employees with a tale of "love at first sight," describing the moment the two companies met on a "blind date" six weeks earlier.

But in reality, the deal was far from inevitable, according to a Securities and Exchange Commission filing detailing how the merger went down.

In all, seven suitors were vying for Whole Foods. And though Amazon may have been the preferred deal partner, tough negotiations ensued, and the e-commerce behemoth came close to walking away from the deal.

Amazon arrived as a bidder in unusual fashion. Whole Foods read a news story from April suggesting the tech giant had been interested in acquiring Whole Foods but ultimately decided against it.

The organic-food retailer's management had since late 2016 been actively discussing strategies to improve Whole Foods' disappointing stock price, which had steadily declined along with profit in recent years.

Pressure to right the ship heightened in early April when the activist hedge fund Jana Partners announced it had acquired a nearly 9% stake in the company and was angling for a big shake-up in the top ranks.

Whole Foods' top brass had no desire to relinquish their control of the company without a fight, and a week later Mackey and his team hired a top defense banker from Evercore with more than a decade of experience battling activist and hostile investors.

Seven suitors

On April 18, inquiries started to trickle in. One industry competitor wrote a letter expressing interest in a deal, followed in subsequent days by inquiries from four private-equity firms.

That week, as interest from potential acquirers began to simmer, Whole Foods' management and an outside consultant mulled over a recent media report indicating Amazon had entertained the idea of buying up their company.

The Whole Foods consultant that Friday called Jay Carney, a former Obama administration spokesman who is now a senior vice president of corporate affairs for Amazon, to see if the tech giant might still be interested in pursuing the grocer. The next Monday, Amazon told the consultant it would be open to a meeting.

Meanwhile, pressure from Jana Partners intensified. That week, the hedge fund met with Whole Foods execs and made various demands, particularly insisting on an overhaul of the board of directors.

The Whole Foods board met that Friday, April 28, to discuss how it would respond to Jana. That's when Mackey informed members that he and other top executives were planning to jet off to Seattle to gauge Amazon's interest in acquiring the company.

They wasted little time, flying to Amazon's headquarters that Sunday for a meeting that Mackey later said lasted 2.5 hours and was "love at first sight."

"I think we coulda talked for 10 hours. And — when we huddled together, it was like we just had — we just had these big grins on our faces, like, 'These guys are amazing. They're so smart. They're so authentic,'" Mackey later told employees in a company town-hall meeting. "They say what's on their mind. They're not playin' a bunch of BS games. And it was like, 'This is gonna be so incredible.'"

But despite Mackey's optimism, a deal was far from certain, and Jana was breathing down his neck.

Whole Foods CEO John Mackey juggled seven suitors but was smitten with Amazon from the start. Reuters/Lucy Nicholson Whole Foods tried to placate Jana the next week by offering up two board seats in exchange for the activist investor's retracting its claws and giving the company 18 months to pursue strategic measures to revive itself.

Jana declined the offer, but Whole Foods nonetheless shook up its board, appointing five new directors on May 10.

Amazon emerges

Over the following weeks, Whole Foods' management continued to weigh its options. One competing grocery retailer suggested a "merger of equals," while another competitor proposed a commercial agreement, such as a supply-chain arrangement.

Then, on May 23, Amazon sent a written offer to buy Whole Foods for $41 per share, valuing the company at $13.1 billion — well above the $35 it was trading at. The tech giant communicated that it felt its bid was very competitive, and it demanded secrecy during the transactions. Any leak or rumor of a deal, and Amazon would be willing to terminate discussions.

Amazon was aggressive about the last point: protecting the secrecy of the "highly sensitive" negotiation. Goldman Sachs, representing Amazon in the transaction, separately called up Whole Foods' banker at Evercore two days later to reiterate: Confidentiality was crucial to a deal, and they would have no part in a multiparty bidding war.

Whole Foods' board met to discuss its options on May 30. It now had six suitors in addition to Amazon: two industry competitors and four private-equity firms.

Evercore advised the board that the buyout shops were unlikely to be able to top Amazon's price. And according to the SEC filing, the bank reminded the directors "that Amazon.com had re-emphasized in multiple communications that Amazon.com would not be willing to further engage with the Company in the event of a rumor or leak of a potential transaction."

Whole Foods decided to pursue Amazon, but it wanted to sweeten the deal. It made a counteroffer of $45 per share, or nearly $14.4 billion. Amazon wasn't pleased.

From the SEC filing:

"The Goldman Sachs representatives expressed their disappointment at the price specified in the Company's counter proposal as they had previously informed the Evercore representatives that Amazon.com believed that it had made a very strong bid."

The next day, Goldman Sachs told Whole Foods that Amazon was now looking at other opportunities — and it was considering whether to reply to the counterproposal or just walk away.

As a last-ditch effort, Amazon offered $42 per share, emphasizing that this was its best and final offer. The tech giant was clear: It wanted a swift response, and it didn't want any other bidders meddling in the process.

From the filing (emphasis added):

"Goldman Sachs also made it clear again to the representatives from Evercore that Amazon.com would disengage from its efforts to acquire the Company and pursue other alternatives and initiatives if the $42.00 per share price were not accepted and that Amazon.com expected that the Company would not approach other potential bidders while the Company was negotiating with Amazon.com (although they understood that the Company's board of directors would have a customary fiduciary out in the merger agreement), and requested that the Company promptly give a yes or no response to the $42.00 offer.

"They signaled Amazon.com's willingness to move forward on the transaction quickly if the Company responded favorably to the offer as well as Amazon.com's resolve in discontinuing discussions with the Company if the Company did not find the revised offer to be attractive."

Whole Foods adhered to Amazon's demands. The companies spent the next two weeks quietly performing due diligence on the deal before approving a merger on June 15 at Amazon's final offer price of $42 per share — $13.7 billion including debt.

With the whole process successfully kept secret in accordance with Amazon's request, the deal, announced the next day, sent tremors across multiple industries and sapped billions from the market caps of grocery stores and pharmacy companies.

Not long after, shares of Whole Foods surged above the deal price, suggesting investors thought — or hoped — that a rival bidder would emerge. But in reality, six other companies had already inquired about Whole Foods, and Amazon had made clear it would under no circumstances engage in a bidding war or exceed a price of $42 per share.

Whole Foods sealed its marriage with Amazon, and this week shares shot back down toward the deal price as investors confronted the realization that the tech giant had won and no competing bid would emerge.