US Airways Group Inc and American Airlines have agreed to give up landing spots and gates at several U.S. airports to win U.S. antitrust approval for their proposed merger, the Department of Justice said on Tuesday.

The government filed a lawsuit in August arguing that US Airways and AMR Corp, parent of bankrupt American Airlines, should be forced to scrap the merger, which would create the world’s largest airline.

The settlement calls for the carriers to divest certain landing spots at Reagan National Airport outside Washington and at New York’s LaGuardia Airport, airports long thought to be central to a deal being struck.

Competing low-cost carriers will also be given more access to airports in Boston, Chicago, Dallas, Los Angeles and Miami, the government said.

Shares of US Airways were volatile following news of the settlement. AMR shares surged 24 percent to their highest level since 2008.

The companies did not immediately comment on the settlement.

(Reporting by Soyoung Kim and David Ingram, writing by Ros Krasny; Editing by Gerald E. McCormick and John Wallace)

Photo Credit: A US Airways Express plane departs from a gate past an American Airlines plane at the Ronald Reagan Washington National Airport in Virginia. Mike Theiler / Reuters