The Justice Department has reached a settlement with American Airlines and US Airways that requires the airlines to sell facilities at seven airports in order to complete their planned merger.

The deal announced Tuesday allows low-cost airlines to increase their presence at many of the nation's largest airports.

Under the agreement, American and US Airways will sell to low-cost carriers 104 slots at Washington's Reagan National, 34 slots at New York's LaGuardia, and rights to gates at Boston's Logan, Chicago's O'Hare, Dallas' Love Field, Los Angeles and Miami airports.

In August, the Justice Department filed an antitrust suit against the airlines, arguing that the combination would reduce choices for customers by giving the combined carrier a stranglehold at certain major airports. At Reagan National, for instance, the two airlines would have controlled 69% of the take-off and landing slots.

"This agreement has the potential to shift the landscape of the airline industry," said Attorney General Eric Holder. "By guaranteeing a bigger foothold for low-cost carriers at key U.S. airports, this settlement ensures airline passengers will see more competition on nonstop and connecting routes throughout the country."

US Air and American had argued that the merger, expected to result in the world's largest airline, would create an enhanced combined network to benefit customers.

Related: American Airlines plans to pack more people into its planes

The trial in the antitrust case had been set to start Nov. 25.

The airlines cheered the agreement and the ability to move forward with the merger. The two carriers had rounded up support from their unions as well as leading politicians around the country to try to pressure Justice into allowing the deal.

"We are pleased to have this lawsuit behind us and look forward to building the new American Airlines together," said US Airways CEO Doug Parker, who will lead the combined carrier.

In a letter to employees, Parker and American CEO Tom Horton said the combined airline would not need to cut additional staff due to the slots and gates it agreed to give up. It said that while the airlines must still obtain approval of the settlement by the U.S. Bankruptcy Court, they expect to complete the merger by the end of the year.

Related: Record profit at American Airlines

The settlement will increase JetBlue (JBLU) access to Reagan National and give Southwest Airlines (LUV) the chance to buy gates at LaGuardia for the first time. It currently leases gates at those airports. Both JetBlue and Southwest shares were higher on the news.

JetBlue and Southwest did not comment immediately on the settlement.

Bill Baer, assistant attorney general for antitrust, said the agreement "will disrupt the cozy relationships among the incumbent legacy carriers," adding it "will dramatically enhance the ability of [low-cost carriers] to compete system wide."

Shares of US Airways (LCC), which were briefly halted ahead of the announcement, gave up earlier gains and were trading slightly lower on the news.

But shares of American parent AMR (AAMRQ) were significantly higher following the announcement. AMR has been in bankruptcy court since November 2011. The merger will allow American shareholders to be compensated, which is unusual for the stock of a bankrupt company.