DALLAS -- American Airlines and US Airways reached a deal with the government that lets the two form the world's biggest airline and opens up more room at key U.S. airports for low-cost carriers.

The settlement announced Tuesday -- if approved by a federal judge -- would end a fight with the U.S. Justice Department and head off a courtroom showdown later this month.

It preserves hub airports in Phoenix, Philadelphia, Charlotte and four other cities for at least three years. And it caps a series of mergers that have already eliminated four big U.S. airlines and stoked fear about higher travel prices.

For American, the nation's third-biggest airline, the deal lets parent AMR Corp. exit bankruptcy protection, repay creditors and reward shareholders.

At US Airways, the No. 5 U.S. carrier, shareholders will own 28 per cent of the new company, employees stand to get more pay, and top executives will realize their dreams of running an airline even bigger than United or Delta.

The Justice Department said it extracted the largest divestitures ever in an airline merger. Attorney General Eric Holder said the agreement would ensure more competition on nonstop and connecting routes throughout the country.

For American and US Airways customers, they'll get reciprocal frequent-flier benefits in January and, executives said, more service to more places eventually. Doug Parker, the US Airways chief executive who will run the new airline, even suggested that customer service will improve because workers will share in a more prosperous industry.

William Baer, assistant attorney general for Justice's antitrust division, said that even a few more gates and flights for low-fare carriers would help consumers. He said that when Southwest picked up slots at Newark, New Jersey, as part of the 2010 merger of United and Continental, it had a ripple effect that reduced fares on many routes.

The airlines were close to finishing the merger in August until the Justice Department and several states filed an antitrust lawsuit to block the deal, saying it would reduce competition on hundreds of routes around the country and lead to higher consumer prices. A trial was scheduled to begin Nov. 25.

The settlement still needs the approval of a federal judge in Washington, but that is expected to be a formality, and the companies expect to close their deal in the first half of December.

In afternoon trading, shares of US Airways Group Inc. rose 25 cents to $23.52, which would make the post-merger company worth more than $16 billion. AMR shares, which trade only over the counter, jumped 6 per cent to $12. Shares of United, Delta, Southwest and JetBlue also climbed.

When the deal closes, American and US Airways will begin co-ordinating prices and schedules as if they were one. Combining the fleets will take months or years.

Standard & Poor's analyst Jim Corridore said the divestitures were larger than he expected but didn't change the financial benefits of the deal to the companies, which say they can achieve at least $1 billion in combined savings and additional revenue. J.P. Morgan analyst Jamie Baker said, "Why mince words? A win for the airlines" is how he viewed the settlement.

The two airlines and some industry experts said the Justice Department had a weak case, especially after allowing four big airline mergers in the past eight years with few conditions. American and US Airways, however, were not willing to bet the fate of their multi-billion-dollar merger on the decision of a single judge.

If the airlines lost in court and the merger got scuttled, American and US Airways would have remained far behind United and Delta without any way to grow quickly.

The new company will be called American Airlines Group Inc., replacing AMR, which will emerge from bankruptcy simultaneously with the merger closing. It will be slightly larger than United and Delta by passenger traffic and have about 100,000 employees and 6,700 daily flights to more than 300 destinations. It will be based at AMR's home in Fort Worth, Texas.

Pete Yost in Washington contributed to this report.