(Reuters) - Delta Air Lines Inc DAL.N on Thursday reported a 21 percent drop in second-quarter profit because of sharply higher labor and fuel costs, despite higher passenger unit revenue, sending its shares down 2 percent.

A Delta Air Lines Airbus A330 aircraft takes off at the Charles de Gaulle airport in Roissy, France, August 9, 2016. REUTERS/Jacky Naegelen

The stock drop reversed positive gains earlier in the week driven by investor optimism about improving passenger unit revenue in the sector. The closely-watched metric measures sales relative to flight capacity.

Breaking a losing streak that has plagued much of the industry for the last two years, Delta posted a 2.5 percent increase in passenger unit revenue, but that performance was overshadowed by the carrier’s poorer-than-expected bottom line.

While positive unit growth is a bright spot for investors, stocks were slightly down sector-wide on Delta’s results. The cost of fuel and mounting labor expenses, prompted in large part by renegotiated contracts with carriers’ pilots, flight attendants and mechanics unions, added a sobering drag on an otherwise uplifting industry outlook on passenger unit revenue.

In the second quarter of 2017, net income fell to $1.22 billion, or $1.68 per share, in the quarter ended June 30, from $1.55 billion, or $2.03 per share, a year earlier.

On an adjusted basis, the No. 2 U.S. airline by passenger traffic earned $1.64 per share, compared to the analyst consensus forecast of $1.67, according to Thomson Reuters I/B/E/S.

Shares of the company were down 2 percent at $54.35.

Delta’s unit revenue is expected to continue trending positive into the third quarter, with the carrier forecasting growth between 2.5 percent and 4.5 percent. That progress is expected to boost the company’s operating margins between 18 percent and 20 percent from the prior year.

Delta said operating expenses climbed during the second quarter on higher salaries and fuel costs, its two biggest cost components. The airline paid an additional $338 million toward 2017 profit sharing with employees.

“The June quarter represented the peak for non-fuel cost pressures this year and we expect our CASM (cost per available seat mile) trajectory to moderate to approximately 2 percent for the September quarter,” Delta Chief Financial Officer Paul Jacobson said in a statement.

Aircraft fuel related expenses rose 18 percent to $1.45 billion during the quarter, while salary costs were up 9 percent to $2.62 billion.

Delta’s operating margin in the June quarter, excluding special items, rose slightly to 18.4 percent, compared to 17.4 percent last year.

Total operating revenue rose 3.3 percent to $10.79 billion.