DALLAS (AP) — A scheduling glitch has left American Airlines scrambling to find pilots to operate thousands of flights over the busy Christmas holiday period.

A spokesman for the airline said Wednesday that American expects to avoid canceling flights by paying overtime and using reserve pilots.

The company released the following statement around 4:20 p.m. Wednesday.

“We are working diligently to address the issue and expect to avoid cancellations this holiday season. We have reserve pilots to help cover flying in December, and we are paying pilots who pick up certain open trips 150 percent of their hourly rate – as much as we are allowed to pay them per the contract. We will work with the APA to take care of our pilots and ensure we get our customers to where they need to go over the holidays.”

American isn’t saying how many flights are affected, but the pilots’ union says that about 15,000 flights were scheduled without a captain, a co-pilot or both.

American, the world’s biggest airline, has about 15,000 active pilots and expects to operate more than 200,000 flights in December.

Pilots bid each month for flying assignments based on seniority. The scheduling glitch let pilots drop scheduled flights — to take a vacation over Christmas, for example — even when there were no other pilots available for that flight. Normally such a request would be denied, especially during busy travel periods.

The pilots’ union estimated that when the problem was discovered late last week, about 19,000 cockpit seats were left empty.

“This is a potential crisis that we see well in advance,” said Dennis Tajer, a spokesman for the union. “This is very unusual.”

The union has lodged a protest against the company’s plan to fix the mistake by tapping reserve or on-call pilots and offering overtime pay for some of the unstaffed flights. The union says American is violating its labor contract by imposing a solution without union input, and is improperly restricting premium pay.

American officials “expect to avoid cancellations this holiday season,” said airline spokesman Matt Miller. “We will work with the (union) to take care of our pilots and ensure we get our customers to where they need to go over the holidays.”

Miller declined to say how much American expects to pay out in overtime because of the glitch.

Despite American’s can-do response, scheduling mix-ups can create serious problems in the airline business. In September, Irish low-cost carrier Ryanair said it would cancel more 20,000 flights between November and March after admitting it “messed up” the transition to a new system for scheduling employee vacations.

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)