American Airlines Group Inc. posted a loss that was narrower than expected while warning that costs this quarter will continue to pinch profit as revenue remains below pre-pandemic levels.

The third-quarter loss came to $641 million, or 99 cents a share, the carrier reported Thursday. Analysts expected a shortfall of $1.03 a share, based on the average of estimates compiled by Bloomberg. Revenue nearly tripled from a year earlier to $8.97 billion, while Wall Street projected $8.94 billion.

American joined other carriers in warning about higher costs this quarter. It expects to pay as much as $2.48 a gallon for fuel, up from an average $2.07 in the third.

Fuel costs vie with labor as the largest expenses for carriers, and persistently higher prices could help derail efforts by most U.S. airlines to resume recording profits while trying to recover from the collapse in travel during the coronavirus pandemic. American spent $1.95 billion on fuel and taxes in the third quarter, triple the level of a year earlier.

American indicated that pandemic-related losses would continue into the fourth quarter, forecasting a pretax margin of minus 16% to minus 18%, excluding special items.

The outlook for unit costs was at least twice what MKM Partners analyst Conor Cunningham had expected. “The company is likely facing labor escalation as well as additional inflationary cost pressures,” he said in a note.

Revenue will be about 20% below the same period in 2019 as American waits for business travel, especially on international routes, to return in force, the carrier said.

“While the rise of the Covid-19 delta variant delayed some of our revenue recovery, it has not stopped our progress,” Chief Executive Officer Doug Parker said in a statement.

The “vast majority” of employees have received Covid-19 vaccinations under the White House’s mandate for federal contractors, he said in an interview on CNBC. Most of the rest will get shots by a Nov. 24 deadline, except for those who receive exemptions, he said.

“No one is going to leave American, we don’t want anyone to leave American over this,” Parker said.

American rose 1.2% to $19.75 at 9:44 a.m. in New York. The stock had climbed 24% this year through Wednesday, the biggest gain on the S&P 500 Airlines Index.

The carrier released preliminary results for the quarter on Oct. 12.