(Bloomberg) -- CVS Health Corp. was the mystery bidder that tried to buy primary-care company One Medical before Amazon.com Inc. swooped in to acquire it for $3.5 billion, according to people familiar with the matter.

One Medical was put into play by a company identified in a regulatory filing Wednesday as “Party A.”

Party A was CVS, the people said, asking to not be identified because the matter isn’t public. Bloomberg News reported in July that One Medical was exploring a sale after drawing takeover interest from companies including CVS.

The proxy filing with the US Securities and Exchange Commission Wednesday gives new insight into how one of the most high-profile deals in the health-care sector this year came together. It shows that CVS negotiated with the company for months, and even offered the same amount that Amazon ultimately agreed to pay. 

CVS first approached One Medical parent 1Life Healthcare Inc. about a deal in October 2021 and was in the mix to buy the company until weeks before it agreed to sell to Amazon, according to the filing. CVS had offered to pay $18 a share in cash for One Medical in June but later had concerns about moving at an “expedited pace,” according to the filing. 

Amazon entered the fray in February but paused M&A discussions in April. It restarted M&A conversations after it learned that 1Life had gotten an offer from someone else. On July 2, Amazon offered to pay $18 per share in cash, subject to due diligence. Amazon said it would stop engaging if its interest leaked.

Amazon ultimately reached an agreement to buy One Medical on July 20. The deal was announced the next day. 

CVS has said it plans to expand into primary care by partnering with doctors or making acquisitions as part of ambitions to make health care more convenient, personalized and affordable for consumers.

©2022 Bloomberg L.P.