The Seattle-based company will pay $42 a share for Whole Foods, which was founded in Texas in 1978 and has more than 460 stores across the US, Canada and UK, including one in Giffnock, East Renfrewshire, that opened in 2011.

With about 87,000 staff, Whole Foods generated sales of about $16bn last year. Its brand will be retained under the deal with Amazon, which is expected to complete by the end of this year, subject to shareholder and regulatory approval.

John Mackey, Whole Foods co-founder and chief executive, said: “This partnership presents an opportunity to maximise value for Whole Foods Market’s shareholders, while at the same time extending our mission and bringing the highest quality, experience, convenience and innovation to our customers.”

Mackey will remain as boss of the retailer, which is keeping its headquarters in Austin, Texas.