In the end, Amazon beat them all.
The tech titan is making a huge step into the drug-delivery market by entering into a definitive merger agreement to acquire Somerville-based PillPack. The deal, which scoops Amazon competitors like Walmart and CVS, was announced on Thursday.
Terms of the transaction have not been disclosed by Amazon, but sources close to the deal told Techcrunch it was for "just under $1 billion."
Rumors that PillPack was considering an acquisition had surfaced in April. At that time, Walmart was reported to be the frontrunner in closing a deal for a reported "under $1 billion." Also, CNBC reported that Amazon looked into acquiring PillPack and held conversations with the startup at some point.
Founded in 2013, PillPack delivers medications in pre-sorted dose packaging and raised a total of over $120 million in funding. The company operates out of its vintage-style headquarters in Somerville, with offices in Salt Lake City and New Hampshire. As of 2016, it had more than 500 employees.
Amazon's previous acquisitions in the greater Boston area include Blink, an Andover-based home security startup that Amazon bought for $90 million in December 2017, and Kiva Systems, which became known as Amazon Robotics after the Seattle company acquired the North Reading-based robotics startup for $775 million in March 2012.
In Thursday's pre-market session, shares of Walgreens and CVS fell 9 percent and 8 percent, respectively, as investors worried Amazon may disrupt the drugstore market.
"PillPack makes it simple for any customer to take the right medication at the right time, and feel healthier," 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 deal, which is subject to regulatory approvals, is expected to close during the second half of 2018.