Amazon has officially entered the $400 billion pharmacy business.

The retail giant announced Thursday that it is acquiring online pharmacy service PillPack, which delivers pre-sorted daily medications for consumers who take multiple prescriptions.

Shares of rival pharmacies CVS, Walgreens, and Rite Aid immediately sank by as much as 9 percent on fears that the Seattle-based online behemoth would crumple the drugstore market.

“PillPack’s visionary team has a combination of deep pharmacy experience and a focus on technology,” said Jeff Wilke, head of Amazon’s worldwide consumer division — and CEO Jeff Bezos’ right-hand man.

“PillPack is meaningfully improving its customers’ lives, and we want to help them continue making it easy for people to save time, simplify their lives, and feel healthier. We’re excited to see what we can do together on behalf of customers over time," said Wilke.

TJ Parker, co-founder and CEO of PillPack, said in a statement. “Together with Amazon, we are eager to continue working with partners across the healthcare industry to help people throughout the U.S. who can benefit from a better pharmacy experience.”

The soaring price of health care has shone a spotlight on an interconnected machine of players that comprise the U.S. health care system — one that Amazon has been keen to disrupt.

Earlier this week, Amazon announced that it hired respected physician and author Atul Gawande to head up the healthcare initiative it launched with Berkshire Hathaway and JPMorgan Chase in January with the goal of providing “high-quality and transparent health care at a reasonable cost.”

Additionally, Amazon's $13.7 billion purchase of the natural and organic supermarket chain Whole Foods in June last year could provide the real estate Amazon may need to expand its pharmacy interests. The company has already begun offering deeper discounts to members of its Prime program who shop at Whole Foods.

"Amazon could use this retail footprint for consumers to pick up prescriptions," GoodRx co-founder Stephen Buck told CNBC. "The acquisition of Whole Foods makes entry into pharmacy much easier for Amazon."

The PillPack deal is expected to close later this year.