Southwest Airlines Co. said it was “hopeful” of returning to profitability in the third and fourth quarters, amid concerns over the financial impact of a coronavirus variant and a recent rash of flight delays.

The potential for an adjusted profit excludes any benefit from billions of dollars in airline aid provided by the U.S. government, Southwest said Thursday as it reported second-quarter results. The carrier recorded a profit in June, not counting federal funds, its first since the pandemic began. Delta Air Lines Inc. and United Airlines Holdings Inc. have both predicted a return to profit.

Based on current trends, “we are hopeful to be profitable” in the third and fourth quarters, Southwest Chief Executive Officer Gary Kelly said in the statement. “Second quarter 2021 marked an important milestone in the pandemic recovery as leisure travel demand surged.”

The outlook underscores the industry’s optimism that it’s turning a corner after the worst airline crisis in history, even as the spread of the virulent delta variant of the coronavirus raises investor anxiety about the rebound in flying. Southwest also has been grappling with the worst flight delays in the industry, spurred by staffing shortages and bad weather.

Southwest was little changed at $53.07 before the start of regular trading in New York. The shares climbed 14% this year through Wednesday, the second-best performance in Standard & Poor’s index of the five largest U.S. airlines.

Leisure Gains

Leisure traffic and fares are expected to trend higher this month than July 2019 levels, Southwest said, and business bookings have steadily improved in July. Revenue this month will be 10% to 15% lower than July 2019, while August will be down by as much as 17%.

The “vast majority” of employees who took voluntary leave will be recalled by the end of the third quarter, and will combine with overtime spending to address the operating challenges and rising fuel prices to boost operating costs this quarter.

Southwest’s second-quarter adjusted loss narrowed to 35 cents a share. Wall Street had expected a shortfall of 26 cents, based on the average of analyst estimates compiled by Bloomberg. Revenue quadrupled to $4 billion. Analysts had expected $3.93 billion.

Virus concerns weren’t the only challenge in the quarter. Southwest had 38,450 flight delays in June, or 40% of the company’s total, according to data tracker FlightAware. Another 3,060 flights were canceled last month.

The operational stumbles have continued for Southwest, with more than 17,600 flights delayed through July 15, according to FlightAware. The Dallas-based airline has extended an offer of double-time pay to employees including flight attendants and airport ground workers who pick up extra shifts. First unveiled for the July 4th holiday, the overtime offer now runs through mid-August.

“We are intensely focused on improving our operations as we restore our network to meet demand,” Kelly said. Flying capacity this quarter and next will return to 2019 levels, and 39 aircraft remaining in storage will undergo maintenance checks and be returned to flying by the end of this year.