AMR Corporation (AAMRQ) , the parent company of American Airlines, is seeing shares take flight on Thursday to two-month highs after posting its third-quarter earnings and getting an upgrade from JPMorgan (JPM) . American Airlines is the fourth largest U.S. air carrier.

For the quarter ended September 30, the Fort Worth, Texas-based airline operator reported revenue of $6.83 billion, an increase of 6 percent from $6.43 billion in the year prior quarter. That was the best quarter on record in the history of the company. On a GAAP-basis, net profit was $289 million, a huge swing from a net loss of $238 million in the same quarter of 2012. Excluding reorganization expenses and other one-time items, net profit was $530 million, compared to $110 million in Q3 2012.

The results are encouraging for AMR, posting its second straight quarterly profit and third in the last four quarters as it continues to rebuild after filing bankruptcy less than two years ago.  In the first nine months of 2013, the company has reported $167 million in profits.

The stock plunged as low as $0.20  in November 2011, but slowly regained traction, largely on the back of a planned merger with US Airways Group Inc. (LCC) .  That plan has been delayed since the Justice Department challenged the deal in August. The antitrust lawsuit is set for trial next month with most expecting a ruling in January 2014.

News of the Justice Department’s actions sent the stock price of AAMRQ down from around $6 to lows of $2.06, but the resilient stock has clawed its way back to regain most of the losses.

"Continued execution on our product, network and alliance strategy, combined with cost efficiencies from restructuring and fleet renewal, creates strong momentum towards our planned merger with US Airways. And we are especially pleased to set aside $59 million this quarter in expectation of making our first profit-sharing payout since 2001 to our people who have done so much to put American back on top," said Tom Horton, AMR's chairman, president and chief executive.

AMR ended the third quarter with approximately $7.7 billion in cash and short-term investments, including restricted cash, compared to a balance of approximately $5.1 billion at the end of the third quarter of 2012.

Meanwhile, JPMorgan boosted its rating on AMR Corp. to “overweight” from “neutral” because it sees an increased likelihood that the merger with US Air will happen. JPM analysts now give the deal a 60-percent chance of going through, up from the 50 percent it had previously forecast. JPMorgan’s Jamie Baker and Mark Streeter said they expect a verdict no later than January 18.

Shares of AAMRQ are up 8 percent in Thursday trading (1 PM ET) at $5.56.  Other airlines are climbing as well, with US Air up 1.5 percent, Southwest Airlines Co. (LUV) ahead 2.5 percent, United Continental Holdings (UAL) rising 1.7 percent and Delta Air Lines (DAL) advancing just under 1 percent.