(Reuters) - A decision by Goldman Sachs Group Inc (>> Goldman Sachs Group) last year to move an investment banking veteran to Seattle, as well as Evercore Partners Inc's (>> Evercore Partners Inc.) hiring of a top banker defending companies against activist investors, has paid off handsomely.

Goldman advised Amazon.com Inc (>> Amazon.com) and Evercore advised Whole Foods Markets Inc (>> Whole Foods Market, Inc.) on Amazon's $13.7 billion (10.72 billion pounds) acquisition of Whole Foods that will see the U.S. organic grocery chain become part of the world's largest internet retailer.

The deal was Amazon's first valued at more than $1 billion, making it a coveted trophy for investment bankers in search of fees and glory.

Goldman had laid the ground for this moment. Last year, it dispatched senior bankers to several North American cities where big companies are based, including Atlanta, Toronto and Seattle.

One of those bankers, David Eisman, moved from San Francisco to Seattle to help lead a small team tasked with strengthening ties with the city's biggest companies, including Amazon, Microsoft Corp (>> Microsoft Corporation) and Starbucks Corp (>> Starbucks Corporation).

When Amazon decided to approach Whole Foods last month, it picked Goldman for advice. Eisman advised the company alongside fellow Goldman bankers Colin Ryan, who focuses on technology mergers, and Cosmo Roe, who focuses on consumer and retail companies.

Evercore itself clinched a role in the deal with the help of a Goldman alumnus. Last year, Evercore poached Goldman's head of activism defence Bill Anderson, who for more than 12 years had advised more than 175 companies on how to tackle activist investors and hostile bids.

When Jana Partners LLC in April said it had raised its stake in Whole Foods in April and pushed for a sale of the company, Whole Foods interviewed several investment banks to hire an adviser to help defend against the activist hedge fund.

"From the moment Jana had announced its stake in Whole Foods ... an onslaught of attention from media and banks ensued," Whole Foods' chief executive, John Mackey, said in a Texas Monthly article this month.

Whole Foods' conversations with banks took place before the company was approached by Amazon, so Goldman was also vying for a role with Whole Foods. With Anderson among its ranks, however, Evercore prevailed.

When Amazon approached, Whole Foods turned again to Evercore. Anderson advised Whole Foods alongside senior Evercore bankers Eduardo Mestre and William Hiltz.

Goldman now stands to receive $30 million to $35 million in advisory fees, while Evercore stands to receive $40 million to $50 million, according to estimates from investment banking advisory firm Freeman & Co LLC.

Goldman and Bank of America Corp (>> Bank of America), which provided bridge financing to Amazon, could receive between $35 million and $50 million in debt arranging fees, according to Freeman.

(Reporting by Lauren Hirsch in New York; Additional reporting by Michael Flaherty in New York; Editing by Leslie Adler)

By Lauren Hirsch