Virgin Atlantic Airways Ltd. sold two Boeing Co. 787 jetliners to fund the repayment of a loan from hedge fund Davidson Kempner Capital Management that formed the basis of a hard-won rescue last year.

The planes were bought by Griffin Global Asset Management and Bain Capital Credit, Virgin Atlantic said in a statement Friday. The sale and leaseback deal, which allows the airline to go on operating the aircraft, raised $230 million.

After paying off the balance of the $170 million borrowed from New York-based Davidson Kempner at the height of the coronavirus crisis, Virgin Atlantic will have 70 million pounds ($96 million) left for its own funds.

The loan from Davidson helped save Virgin after Britain refused it access to state funding tapped by half a dozen other airlines, setting management off on a six-month search for backers. Billionaire founder Richard Branson also injected 200 million pounds raised through the sale of shares in his Virgin Galactic Holdings Inc. space venture as part of a 1.2 billion-pound package.

Bain Capital’s involvement in the 787 transaction comes after the private-equity firm rescued the U.K. airline’s sister-carrier, Virgin Australia Holdings Ltd., after it called in administrators in March.

Virgin Atlantic, which is 49% owned by Delta Air Lines Inc., has also cut more than 3,000 jobs and shuttered operations at London Gatwick airport as part of its survival strategy.