After 4 1/2 years, Delphi Corp. can see the exit sign. U.S. Bankruptcy Judge Robert Drain told a packed courtroom in Lower Manhattan Thursday that he had approved Delphi’s plan to hand over control of the company to its debtor-in-possession lenders. The lenders, in turn, have agreed to forgive billions of dollars of debt.

The deal was brokered by Delphi and General Motors, which also has provided the auto parts maker with billions of dollars in operating capital since it first filed for bankruptcy in October 2005.