(Reuters) - Activist investor Jana Partners LLC cashed out of its position in Whole Foods Market Inc (>> Whole Foods Market, Inc.), a regulatory filing showed on Wednesday, after the upscale grocer agreed to be acquired by Amazon.com Inc (>> Amazon.com) 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.

(Reporting by Karina Dsouza in Bengaluru; Editing by Sai Sachin Ravikumar)

Stocks treated in this article : Whole Foods Market, Inc., Amazon.com