(Bloomberg) -- Yellow Corp.’s last-gasp loan from creditors led by Apollo Global Management Inc. buys the company time to sell off its rigs and terminals — but the $142.5 million won’t come cheap for the failed trucker.

The new bankruptcy financing will carry an interest rate of 17%, reflecting the high risk of lending to a company that’s already collapsed under debts it can no longer pay. It also comes with a $7 million fee, which could jump as high as $32 million if the bankruptcy drags on for months.

The deal, however, stands to assuage another very important creditor: The US government, which is owed more than $700 million for loans made to Yellow during the depths of the pandemic. 

The fees are intended to motivate Yellow to sell its assets as quickly as possible or find alternative financing so Apollo can exit from its investment, according to a person familiar with the matter. Plus, the deal is structured such that the higher fees don’t kick in unless the Treasury Department has been repaid in full.  

The structure of the financing marks an effort to both hasten the resolution of the company’s bankruptcy and navigate its relatively unusual partnership with the US government. The trucking giant received its loan during Donald Trump’s presidency under a program to aid companies crucial to national security, which drew criticism from lawmakers given Yellow’s history of financial problems. 

The Nashville-based company filed for bankruptcy this week after its revenue declined, losses piled up and it faced more than $1 billion of debt coming due next year. The collapse will cost some 30,000 employees their jobs, with management and the International Brotherhood of Teamsters, which represents employees, trading barbs over who’s to blame. 

The financing led by Apollo — which is already an existing creditor under a $600 million loan to the company —  will allow Yellow to keep operating as it winds down through a Chapter 11 proceeding. 

Yellow said the alternative was a Chapter 7 liquidation, which would result in its immediate closing and potentially worsen the recoveries for creditors. The US Treasury consented to the terms of the Apollo loan, according to court records. A bankruptcy judge must review and sign-off the loan before Yellow can start drawing on it.

Read More: Teamsters Deny Yellow’s Claim That Union Caused Bankruptcy

Most of the proceeds are earmarked for paying the cost of the bankruptcy and operating Yellow’s business. But it will also cover interest on the government loan. A proposed budget filed in bankruptcy court proposes paying $19.8 million of interest on the Treasury loan through September. Interest on the Apollo loan could cost $16.7 million over the same period, court papers say.

Cody Leung Kaldenberg, a partner with Ducera Partners LLC, which is working with Yellow, said in a court statement that the arrangement provides an incentive to refinance the debt as well as the ability to “avoid a significant portion of the fees if a more cost effective debtor-in-possession financing alternative becomes available.”

©2023 Bloomberg L.P.