FILE PHOTO - Customers leave the Whole Foods Market in Boulder, Colorado, U.S. on May 10, 2017. REUTERS/Rick Wilking/File Photo

(Reuters) - Activist investor Jana Partners LLC cashed out of its position in Whole Foods Market Inc WFM.O, a regulatory filing showed on Wednesday, after the upscale grocer agreed to be acquired by Amazon.com Inc AMZN.O in a $13.7 billion deal last month.

Jana, which was Whole Foods’ second-largest shareholder with an 8.2 percent stake, made a profit of over $300 million on the sale, according to Reuters calculations.

Jana bought 27.9 million shares of the company for $721.2 million in March, and exited its position on Tuesday for a price of more than $1 billion.

The investor had heaped pressure on Whole Foods to sell itself after taking a stake in the company, citing the retailer’s lagging sales and stock price.

In June, Whole Foods agreed to be bought by Amazon for $13.7 billion in a sector-altering deal that could see the e-commerce giant enter the brick-and-mortar retailing industry.