Bankruptcy Judge Basil Lorch III in Indianapolis approved the purchase, ATA said. Southwest, the largest U.S. discount carrier, will pay $40 million for the gate leases and a maintenance hangar at Midway, and $30 million for a 27.5 percent stake in the reorganized ATA. The carrier also will lend ATA $40 million to operate in bankruptcy and will guarantee a $7 million loan.

Southwest, which has 19 Midway gates now, might expand its Midway flights as much as 40 percent, from the current 145 to 200 by 2006. Dallas-based Southwest outbid AirTran Holdings Corp. for the opportunity to expand at Midway, an alternative to Chicago's O'Hare International, the second-busiest U.S. passenger airport.

"What Southwest wants, Southwest gets," said Ray Neidl, a Calyon Securities USA analyst in New York. "What Southwest did was a stroke of genius by getting the gates they wanted by doing a code-share and investing in ATA."

The agreement includes a flight link between Southwest and Indianapolis-based ATA scheduled to start in February. The link, known as a code-share, will let passengers connect between the carriers' flights using one ticket. It is the first significant code-share arrangement for either airline.

The partnership gave Southwest's offer a boost over Orlando, Fla.-based AirTran's $90 million bid in the auction process last week, J. George Mikelsons, ATA's chairman, president and chief executive, said after his company decided to accept Southwest's bid Dec. 16.

Southwest said it expects to complete the transactions this week.

"The real winners are customers traveling to and from Chicago Midway Airport who will see more low-fare Southwest service and a continuing presence from ATA," Southwest CEO Gary Kelly said.

ATA filed for bankruptcy protection Oct. 26, blaming high fuel costs and losses. It listed $745 million in assets and $940 million in liabilities. The company agreed then to sell 14 Midway gate leases and other assets to AirTran. Southwest made its bid Dec. 10.

ATA originally planned to scale back operations, leaving only its Chicago Express commuter service, scheduled service from Indianapolis and the West Coast to Hawaii, and military and leisure charters.

"They're going to have to look at all their labor costs and the costs of their aircraft leases," Neidl said of ATA's restructuring.

Southwest's shares rose 13 cents to close at $15.71 yesterday on the New York Stock Exchange. ATA's shares gained 11 cents, or 13 percent, to 95 cents. Mickelsons said last week that his company's shares probably will be wiped out in the bankruptcy reorganization.