A U.S. bankruptcy judge on Thursday approved AMR Corp's plan to exit bankruptcy, subject to resolution of a U.S. government lawsuit to block a proposed merger with US Airways Group Inc .

Judge Sean Lane approved the plan at a hearing in the U.S. Bankruptcy Court in New York.

It was the American Airlines parent's third attempt to convince Lane to approve the deal in the face of opposition to the merger, which is the main component of the plan. At prior hearings, Lane had expressed uncertainty about approving a plan that might change.

But on Thursday Lane said his job was to determine whether the plan meets standards of feasibility under bankruptcy law, independent of the lawsuit.

"The question is whether it will succeed once consummated, not whether it will be consummated," Lane said. "Here, there can be no dispute that the plan is feasible, if allowed to proceed."

While Lane's ruling gives his blessing to AMR's restructuring efforts, any divestitures or other material changes to the plan that result from settlement talks with the Justice Department would have to go back to him for approval.

In its lawsuit on August 13, the Justice Department said the merger would create too much consolidation and lead to higher fares for consumers.

If the Justice Department succeeds in blocking the merger, it would put AMR's restructuring back to square one and require it to forge new strategies for paying back creditors. AMR shareholders, who stand to receive a 3.5 percent stake in the merged entity, would likely be wiped out under any plan that excludes a merger, restructuring experts say. Most of AMR's key creditors, including its unionized workers, support the tie-up.

The antitrust lawsuit is likely to take months to resolve, and possibly longer if it goes to trial.

(Reporting by Nick Brown; Editing by Lisa Von Ahn and Chris Reese)