U.S. carrier United Airlines reported that it suffered a huge loss last year after the crippling blow brought by the coronavirus pandemic to travel, but the carrier is optimistic of a partial recovery this year, Agence France-Presse reported on Thursday.

United posted an annual loss of more than $7 billion compared with profits of $3 billion in 2019. Its full-year net loss was the biggest since 2005, according to data from FactSet. United shed $7 a share, lower than the expected loss of $6.6 per share, Refinitiv data shows. The carrier made $3.40 billion in revenues, but missed projections of $3.45 billion.

Shares of the airline were down over 2% in after-hours trade.

The company said it expects 2021 to be a "transition" year thanks to COVID vaccines as it pledged to surpass pre-crisis profit margins by 2023.

Wall Street analysts' consensus on United reflects huge uncertainty in the first six months this year, with a "Hold" rating based upon four "Buy" and "Hold," and three "Sell" guidance.

"Aggressively managing last year's challenges depended on our innovation and fast-paced decision making. But, the truth is that COVID-19 has changed United Airlines forever," Scott Kirby, United Airlines Chief Executive Officer, said in an earnings release.

While the outlook for the coming months remains uncertain for all airline companies, United said it has gotten a handle on how to remain afloat in immediate challenges through a mixture of returning travel sales and cost-cutting.

Since the start of the COVID-19 crisis, United has generated more than $26 billion in liquidity and made major progress in cutting core cash burn to ensure the airline's survival.

United wrapped up 2020 with nearly $20 billion in available liquidity, including an unused revolving capacity and funds available under the CARES Act loan program from the U.S. Treasury.

Kirby said the carrier's response to the pandemic was effective in repositioning the airline for the long haul, pledging United would come out of the crisis "better, stronger and more profitable than ever."