A judge has denied American Airlines’ (AA) request to scrap the collective bargaining agreement it has with its pilots’ union, and some experts are calling the denial an unexpected setback in the company’s effort to save millions of dollars.

Judge Sean Lane, the U.S. bankruptcy court judge in Manhattan who is overseeing the airline’s Chapter 11 restructuring, said in his ruling yesterday that allowing AA to abandon the contract would give it carte blanche to temporarily lay off pilots and engage in code-sharing. He also said the airline failed to show that scrapping the contract would be necessary for its operations.

Not surprisingly, the pilots union views Lane’s decision as a victory. “Clearly management went well beyond what is the industry standard for bankruptcy contracts, and the judge recognized this in his decision today,” Allied Pilots Association President Keith Wilson said in a statement.

AA’s parent company, AMR Corp., said it plans to resubmit the motion, with changes, by Friday.

Read more about this story on Thomson Reuters.

Read more InsideCounsel stories about AA and its ongoing battle with its pilots:

American Airlines reached tentative contract agreement with pilots union

American Airlines’ union election temporarily blocked

America defends its lawsuit against pilots union

Pilots’ union sues American Airlines

American Airlines files for Chapter 11 bankruptcy