Following US$3.9 billion deal, Amazon to buy health firm One Medical Inc. announced it would buy primary care company One Medical for $18 a share, the latest move by the e-commerce giant to enter the health care market.

The all-cash transaction is valued at about $3.9 billion, including One Medical’s net debt, it said. Amazon in a statement Thursday.

One Medical, whose parent company is called 1Life Healthcare Inc., operates 182 doctor offices in 25 markets in the U.S. Customers pay a subscription fee to access their doctors and digital health services 24 hours a day.

“We think healthcare is high on the list of experiences that need reinvention,” said Neil Lindsay, senior vice president leading Amazon’s healthcare drive.

In recent years, Amazon has launched an online pharmacy, following its acquisition of mail-order pharmacy PillPack Inc., and started a primary care clinic for its employees and a few other companies, among other health-focused initiatives.

Bloomberg reported earlier this month that One Medical was weighing its options after attracting acquisition interest, including from CVS Health Corp. Shares of Amazon rose 1.3% in early trading Thursday and 1Life Healthcare surged a 2.6%.

Completion of the transaction is subject to customary closing conditions, including One Medical shareholder approval and regulatory approval. Upon completion, CEO Amir Dan Rubin will continue to lead One Medical.