Amazon is acquiring online pharmacy PillPack in a deal that is already shaking up the drugstore industry.

The move is the strongest indication yet of Amazon's intent to push further into the health-care industry. It threatens to remove one of the few distinguishing factors pharmacy chains have relied on to fend off Amazon, the sale of prescription drugs. Retailers like Walgreens Boots Alliance, CVS Health and Rite Aid have seen their so-called front of store sales threatened as shoppers increasingly buy household staples online or from convenience stores.

Shares of all three tanked Thursday on the news, along with drug distributors Cardinal Health, AmerisourceBergen and McKesson. Rite Aid, Walgreens and CVS Health lost about $12.8 billion in market value on Thursday alone.

PillPack, which organizes and delivers packages of medications for consumers, is licensed to ship prescriptions in 49 states, according to its website.

"Yes, it's a declaration of intent from Amazon," Walgreens Boots Alliance CEO Stefano Pessina acknowledged to analysts in a planned call to discuss its quarterly earnings, according to an initial transcript from FactSet. "[But] the pharmacy world is much more complex than the delivery of a certain [pills or] packages."

Terms of the deal with Amazon were not disclosed, though people familiar with the matter told CNBC that Amazon paid roughly $1 billion. The companies expect it to close during the second half of the year.

The start-up has raised $118 million in funding from investors including CRV and Menlo Ventures, and it reached more than $100 million in revenue in 2017, the company has said. In 2016 it was reported to be valued at $330 million.

The company previously had sale talks with Walmart, which had considered buying the start-up for less than $1 billion, CNBC has reported.