(Bloomberg) -- Goldman Sachs Group Inc. found the perfect buyer for the riskiest piece of a $5.9 billion buyout financing: its own asset management division. 

The lender is providing a $865 million second-lien loan to help fund Brookfield Asset Management’s acquisition of auto-dealership software company CDK Global Inc.

The loan will replace a planned unsecured bond of the same size that was part of a bigger debt commitment to finance the deal, according to people with knowledge of the matter, who asked not to be identified because the transaction is private.  

Bloomberg previously reported that Brookfield had tapped the private-credit market for this portion of the financing, without revealing the lender, as junk bonds have become harder to sell.

Representatives for Goldman Sachs and Brookfield declined to comment.

A group of banks, led by Credit Suisse Group AG and including Goldman, originally underwrote the debt commitment for Brookfield’s buyout, which was announced on April 7. 

The financing package also includes a $4.35 billion leveraged loan that still needs to be launched for general syndication and is expected to hit the market in the coming months, as well as a $650 million revolving credit facility. The acquisition is due to close in the third quarter of 2022.

The privately arranged second-lien loan means the banks that underwrote the deal will be able to sidestep volatility in the high-yield bond market for what would have been the riskiest part of the financing.

Investors have become more hesitant about buying bonds in the past few weeks as fixed-rate debt has been hammered by rising interest rates. The high-yield asset class has lost 8.55% this year on a total return basis, according to Bloomberg index data, faring much worse than leveraged loans that are down just 0.22% and have floating-rate interest that gives investors more protection from inflation. 

Read more: Selling Corporate Bonds Gets Harder as Fed Tightening Takes Hold

Other private credit firms have also recently pinched deals from the high-yield bond market where the cost of borrowing has soared. Ares Management Corp., for example, led a group of lenders on a $2.15 billion second-lien loan to help fund the purchase of television-ratings business Nielsen Holdings.

Private credit loans offer some advantages to borrowers. They can be arranged quickly since discussions are typically with just a small group of lenders, and sometimes even just one. Pricing is also more certain, and less susceptible to the kind of volatility that can hit the broadly syndicated loan and junk-bond markets.

The private market has swelled to more than $1 trillion in size and a number of firms are raising large funds that can back multi-billion dollar buyouts. Unitranche loans, which combine first- and second-lien debt into a single facility, have also grown in size and are frequently helping direct lenders fund buyouts that have historically been financed by Wall Street banks.

Read more: Why Unitranche Loans Grew From Niche to Billions: QuickTake

Among the largest deals financed by private-credit firms are a $5.1 billion facility backed by Apollo Global Management Inc. to SoftBank Group Corp. and a $3.7 billion loan led by Golub Capital to help fund the acquisition of software company Datto Holding Corp.

©2022 Bloomberg L.P.