A U.S. bankruptcy judge largely declined on Friday to rule that former American Airlines parent company AMR Corp had a unilateral right to terminate benefits for nearly 47,000 retirees.

U.S. Bankruptcy Judge Sean Lane in New York rejected a motion AMR made in 2012 for a ruling holding that the health and welfare benefits it provided retirees had not vested and could be unilaterally modified.

Lane did rule for AMR with regard to some employees, but his ruling was a setback in AMR’s bid to shift the program’s costs from the company to the retirees, which included both union and non-union employees.

“American will review his ruling and consider next steps related to the retiree health and life insurance benefits,” said Casey Norton, a spokesman for American Airlines. “We always remain open to productive discussions to finally resolve this matter.”

Read More: American Airlines Retirees’ Poignant Letters to Court on Their Benefits

AMR filed for Chapter 11 bankruptcy protection in 2011, seeking to cut more than $1 billion a year in labor costs.

The company emerged from bankruptcy in November 2013 through a merger with US Airways Group Inc. The combined company is now called American Airlines Group Inc.

As part of its reorganization, the company sought to renegotiate its collective bargaining agreements with various unions for American Airlines employees.

After having reached deals with unions for its current employees, AMR turned its focus toward benefits provided to its approximately 46,930 retirees.

Though Lane ruled in favor of AMR with regard to some retirees who were non-union or management, he largely declined to rule for the company.

“The relevant documents contain language reasonably susceptible to interpretation as a promise to vest benefits and lack language categorically reserving the plaintiffs’ right to terminate their contributions to the retiree benefits,” Lane said.

As a result of the ruling, AMR will now need to proceed to trial should it continue to seek a ruling holding that it has the right to terminate the retirees’ benefits.

Catherine Steege, a lawyer with the law firm Jenner & Block representing the official committee for retirees, said she hoped in light of the ruling the company would “reconsider its efforts to try to take away benefits from the retirees.”

The case is In re: AMR Corporation, U.S. Bankruptcy Court, Southern District of New York, No. 11-15463. (Reporting by Nate Raymond in New York; Editing by Leslie Adler)

Photo Credit: One of the brand-new jets American has recently purchased. American Airlines