New York CNN  — 

Delta Air Lines reported record advanced bookings for this coming summer, a further sign that the US airline industry is putting the pandemic-caused losses behind it.

But rising labor costs did result in a net loss in the period, even if the company reported a profit when excluding special items, the measure most closely followed by investors.

The Atlanta-based airline earned $163 million, excluding special items, in the first three months of the year, compared to a loss of $784 million on that basis a year earlier. Revenue of $11.8 billion was up 45% from a year earlier, and up 14% from the same period in 2019, before the pandemic.

The strong demand for flying means higher fares for customers. The amount passengers paid to fly each mile on Delta was up 17% compared to both a year earlier and the same period in 2019. Total passenger revenue when adjusted for capacity, another key measure of fares, was up 27% compared to a year ago and 14% from the same period in 2019. And planes were fuller, with Delta selling 81% of available seats, up from 75% a year earlier.

The second quarter revenue and earnings were slightly below Wall Street forecasts, which the company attributed to flights canceled due to bad weather. But shares of Delta (DAL) were higher in pre-market trading due to its strong forecast going forward.

The company said the record second-quarter bookings will allow it to post earnings per share of between $2 and $2.25, well above the current forecast of $1.66. For the full year, the company expects earnings per share of between $5 and $6, which could put it well above the $5.40 forecast from analysts.

The company did take a one-time charge of $864 million related to the four-year labor deal it reached with pilots that will increase their pay 34% over the life of the contract. It provides them with an immediate 18% raise and a signing bonus that cost the airline $735 million. The charge for that signing bonus and change in benefits resulted in a net loss in the quarter of $363 million.

The airline also gave 5% raises to many of its other employees as of April 1. The pilots are the only major employee group at Delta who are union members. Other major US airlines, which are far more heavily unionized, face upcoming negotiations with a majority of their employees, and could also see rising labor costs in upcoming financial results.