SAN FRANCISCO (AP) -- Healthcare services company McKesson said Thursday it has acquired its rival German drug distributor Celesio through acquiring Celesio assets from other investors, rescuing a deal that appeared to have failed.

The move comes after McKesson last week failed to gain enough shareholder support for a bid of 23.5 euros a share to buy Celesio outright.

McKesson agreed to acquire the Celesio holdings of Franz Haniel for 23.5 euros a share. It also agreed with an affiliate of Elliott Management to buy Celesio convertible bonds. After those two agreements, McKesson has more than a 75 percent stake in Celesio. Elliot earlier opposed McKesson's bid for the company.

The deals are expected to close within 10 business days.

San Francisco-based McKesson said the deal will help increase its scale, supply chain expertise and sourcing capabilities. The original deal was valued at $8.3 billion, including McKesson's assuming Celesio's outstanding debt.