United Airlines Holdings Inc. posted a narrower loss than analysts had expected as a dip in demand from a summer surge in the coronavirus delta variant proved fleeting. 

The carrier lost $1.02 per share, or $300 million, in the third quarter on an adjusted pretax basis, better than the $1.61 loss analysts had estimated, according to figures compiled by Bloomberg.

United shares rose 2.1% at 5:23 p.m. in trading after the market close. The stock has gained 6.9% this year through the end of trading Tuesday.

Pandemic-driven losses persisted for a seventh quarter at United, which as recently as July had predicted a profit for the latter half of 2021 based on strong demand from leisure travelers and a gradual return of corporate road warriors. But that was before a summer wave of Covid-19 infections and hospitalizations caused an industrywide sales slowdown. United had warned investors Sept. 9 that its planned profit would turn into red ink due to this change in business conditions.

The United loss contrasts with a small, $194 million profit that Delta Air Lines Inc. reported last week at the same time it jarred investors with a warning that fuel prices could lead to another loss in the fourth quarter. 

United’s third-quarter operating revenue was $7.8 billion, down 32% from the same period in 2019. Analysts had predicted $7.6 billion.

United said it would fly 77% of its 2019-level capacity in the fourth quarter, with revenue expected to decline as much as 30% compared to the same period in 2019.

The largest U.S. airlines have pinned their recovery hopes on a robust rebound in international and business travel next year, and were cheered by the recent U.S. decision to allow vaccinated air travelers from Europe to enter the country as of Nov. 8. That policy change by President Joe Biden’s administration could boost carriers’ traffic during the typically slow winter season.

As of the week ending Oct. 17, commercial airline traffic in the U.S. remained 19% below 2019 levels, FlightAware LLC, a Houston-based aviation-data firm, said Tuesday.