A US bankruptcy judge approved the American Airlines-US Airways merger Wednesday, a key step toward making the mega-merger a reality.

Judge Sean Lane, presiding over American’s Chapter 11 bankruptcy case in a federal court in New York, also approved American’s request to extend to May 29 its deadline for submitting a plan to emerge from Chapter 11 protection. “The merger is an excellent result,” Lane said, according to the Associated Press. “I don't think anybody disputes that.”

The American-US Airways merger also requires the approval of the US Department of Justice and US Airways’ shareholders, both of which are expected. American hopes to emerge from bankruptcy protection and close the merger with US Airways in the third quarter.

American’s request for the court to approve the merger also included a request to approve a severance package for chairman, president and CEO Tom Horton valued at around $20 million. Lane, however, did not approve the severance package. Horton will become chairman of the new American temporarily but plans to leave the company shortly after the merger is completed. US Airways chairman and CEO Doug Parker will be the merged airline’s CEO.

Bloomberg reported that Lane did not express opposition to the severance package, but questioned whether it was appropriate under US bankruptcy law to approve it along with approving the merger. Instead, according to the news agency, the judge indicated the severance request should be included in the company’s full plan of reorganization to be submitted by May 29.