Judge Sean Lane approved the merger between Fort Worth-based American Airlines and US Airways Wednesday afternoon, but declined to approve a proposed $20 million severance package to AA executive Tom Horton.

The approval is an important milestone for American, which filed for Chapter 11 in November 2011 after having long resisted using the bankruptcy process to cut labor and other costs. The merger still needs approval from Department of Justice antitrust regulators and US Airways shareholders. It is expected to close by the fall.

Lane hinted early in the afternoon that he was not in favor of the severance package that he later said would "muddy the water" and "add multiple layers of additional review." For now, the judge declined to approve the package and said the timing of it seemed to violate prohibitions in the bankruptcy law.

Lane said he would provide a written explanation of his decision, in greater detail, as soon as possible.

Earlier in the day, attorneys seemed surprised by the judge's opposition and at least one said if the judge rejects any part of the deal, the entire merger could be off.

Lane said he supported the merger in general but suggested the bonus plan for Horton, who has agreed to step down within a year of the completed merger, and other top employees, violates bankruptcy law and instead should be part of the airline's reorganization plan to be submitted later.

"I'm not trying to pile onto Mr. Horton, but it's an intellectual issue," Lane said. "If I pass it now, the argument is it's a done deal."

Lane didn't object to the actual severance payment but agreed with the trustee that the timing of it seemed to violate prohibitions in the bankruptcy law.

"I am bound by the way Congress drafted the statute," Lane said, adding that he was worried about setting a bad precedent that lawyers in future cases will try to capitalize upon. "There are many, many smart lawyers out there," Lane added. "It's not hard to imagine."

An attorney for the debtors, Stephen Karotkin, argued in favor of the severance and said the payments would come later from the assets of the combined airline -- not from the bankrupt company today.

"You can't cherrypick this agreement," Karotkin told the judge in a heated discussion. "You can either approve it or not."

Jack Butler, an attorney for creditors, also argued the severance plan should be approved.

"It is highly unfortunate the payments to Mr. Horton are being deemed or put in a bucket and called 'severance,'" Butler said. "They're actually much more than that."

"Severance is a part of it," Butler said. "It's not the majority of it."

The U.S. trustee, which represents the interests of taxpayers, had filed an objection to the severance payment.

Susan Golden, an attorney for the U.S. Trustee, argued bankruptcy laws prohibit giving such severance payments.

The law was written, Golden said, "to prohibit the enrichment of top-level executives over the interests of the other constituencies, particularly their employees."

Earlier, Karotkin said a merger has “overwhelming support."

“Today at this hearing is a watershed event,” Karotkin said. “The business reasons for the merger are compelling.”

He also noted that nobody involved in the bankruptcy has objected to the payment.

The combined airline would be based in Fort Worth and will have 6,700 daily flights and annual revenue of roughly $40 billion. The new American Airlines will fly slightly more passengers than United, the current No. 1. It will be run by Doug Parker, the CEO of US Airways Group Inc., who began pursuing a merger shortly after American entered bankruptcy protection.

Separately, Lane approved a motion to extend American's exclusive period for filing a reorganization plan until May 29, the last such extension allowed under law. There is then a 60-day waiting period for creditors to object to the plan before Lane can sign off on American's emergency from bankruptcy protection.

Follow Scott Gordon's tweets on the hearing: @ScottGordonNBC5