The Associated Press

NEW YORK (AP) -A bankruptcy judge on Thursday approved Delphi Corp.'s plan to hand control of the big auto parts supplier to its lenders and soon end a nearly four-year stay under Chapter 11 protection.

U.S. Judge Robert Drain said the plan is in the best interests of both Delphi and its stakeholders, especially given the challenges the parts maker has faced recently as a result of the turmoil in the credit markets and the crumbling of the U.S. auto industry.

Drain's approval paves the way for Delphi to emerge from bankruptcy protection. The Troy, Mich.-based company has set a target date of Aug. 31 for emerging and expects to be out by Sept. 30 at the latest.

After Delphi leaves court oversight, its current CEO, Rodney O'Neal, will continue to lead the company and a new board will be appointed, Delphi spokesman Lindsey Williams said.

"I think the management team and the board are really pleased with this outcome because it maximizes the returns for everyone," Delphi Attorney Jack Butler said following Drain's ruling.

"But that satisfaction is tempered only by the fact that this transition has required sacrifice from all of Delphi's stakeholders, including its employees and retirees. We wish we could have avoided that, but that's the reality we all live in."

Delphi nearly emerged from Chapter 11 last year, but was forced to redraw its reorganization plan after a group of investors, led by the Appaloosa Management LP hedge fund, pulled out of an investment deal in April 2008.

The Appaloosa group had planned to invest up to $2.55 billion into Delphi in exchange for equity in the reorganized company. Appaloosa's withdrawal has led to a separate lawsuit which is pending.

After the deal with Appaloosa fell apart, Delphi struggled to find the financing it needed to restructure. Those troubles were complicated by the collapse of investment banks in the fall and the drop-off in new vehicle sales both at home and abroad.

Months later, those same factors helped drive both General Motors and Chrysler into Chapter 11 as well.

Last month, Delphi had agreed to let an affiliate of Beverly Hills, Calif.-based Platinum Equity take control of most of the auto supplier's businesses with the help of billions from GM.

But Delphi's lenders, which have financed the company's operations during its years under court oversight, balked at the deal, callingit a "secretly negotiated transaction" that violated Delphi's obligations to maximize the value of the lenders' investment.

The lenders submitted their own bid, under which they will forgive a combined $3.44 billion in debt owed to them. The lenders' bid ultimately won out over the deal with Platinum after an 18-hour auction process that ended on Monday.

Both of the deals had been backed by GM, which has pumped billions of dollars into Delphi since it filed for Chapter 11 to ensure a stream of parts for its vehicles.

Delphi, GM's former parts division, was spun off in 1999 and filed for Chapter 11 in October 2005. It still produces about 10 percent of the parts used in GM's global production and its components go into nearly all of GM's North American production lines.

As it had agreed under the deal with Platinum, GM will take back some of Delphi's businesses, including its Saginaw, Mich.-based steering business, and facilities and contribute billions in aid to help finance the deal. Other "noncore" assets will be sold off over time.

Nearly 2,000 objections ‚ including about 1,400 from individual Delphi workers and retirees ‚were filed against the plan approved Thursday, but all of them were either resolved out of court or dismissed by Drain.

The exact details of the credit bid, which isn't a public document, have not been released. When it emerges from Chapter 11, Delphi will be privately held and won't have to disclose most financial information.

Butler on Thursday would not confirm or deny if talks were still active between Delphi and Platinum. The company has said it plans to make a $30.5 million payment to Platinum to compensate them for their expenses.

Platinum released a statement Thursday calling its role in Delphi's restructuring a "unique showcase" of its abilities.

"We are excited to continue exploringways to contribute to Delphi's long-term health and profitability, and we look forward to extending Platinum's lengthy track record of success in helping companies reach their full potential," the firm said.