(Reuters) - Drug distributor AmerisourceBergen Corp agreed to buy PharMEDium Healthcare Holdings Inc for $2.58 billion from private equity firm Clayton, Dubilier & Rice, expanding its business of supplying compounded drugs to hospitals.

Compounding is a process in which pharma products are diluted to create doses that are not sold commercially.

Increased regulatory oversight following a fungal meningitis outbreak at a compounding pharmacy in 2012 has escalated the costs for hospitals to produce compounded products internally, boosting demand for large-scale firms such as PharMEDium.

"PharMEDium brings ABC a complementary service line that is undergoing a growth renaissance as hospitals more aggressively outsource compounded sterile needs in wake of new government regulations," Baird Equity Research analyst Eric Coldwell wrote in a note.

Lake Forest, Illinois-based PharMEDium provides compounded intravenous and local anesthesia products to about 3,000 hospitals in the United States.

Clayton, Dubilier & Rice acquired PharMEDium in January 2014. While no financial terms were disclosed, media reports said the deal was done at around a $900 million enterprise valuation.

PharMEDium filed for a $100 million IPO in August, planning to list on the New York Stock Exchange.

AmerisourceBergen has been focusing on M&As to expand its product offerings. In January, the company bought MWI Veterinary for $2.5 billion to expand into animal health.

The PharMEDium acquisition is expected to add 22-26 cents to AmerisourceBergen's adjusted earnings per share in 2016 and generate savings of about $30 million by 2018, the company said on Tuesday.

Morgan Stanley is the financial adviser to AmerisourceBergen, while J.P. Morgan Securities LLC and Credit Suisse advised PharMEDium.

AmerisourceBergen's shares were marginally up premarket after closing at $94.99 on Monday.