If Santa is flying, so is American Airlines.

That was the word late Friday afternoon from American and the union representing its 15,000 pilots.

The Allied  Pilots Association leadership met Friday with senior managers at American and agreed to terms "in principle" to staff all flights during the Christmas holiday season, after a scheduling glitch left the airline without pilots for thousands of flights.

On Wednesday, American acknowledged that a computer error had allowed too many pilots to schedule vacation time during the holidays. More than 15,000 flights were without full pilot crews between Dec. 17 and 31, the union said.

The error caused the scheduling system to show that the airline had sufficient crew for some flights when it did not. Affected by the glitch were flights originating in Philadelphia, Dallas-Fort Worth, Boston, Miami, New York, Salt Lake City, and Charlotte, N.C., according to a company memo to the union reported by Bloomberg News on Wednesday.

American, the world's largest carrier, runs a big hub in Philadelphia with 390 daily flights, and will operate 200,000 flights throughout its system in December.

On Thursday, American provided an update that only "a few hundred" flights in December were without assigned pilots. "That number of open flights continues to decrease, thanks to our pilots who are stepping up to the plate and picking up trips," American said.

But the union representing pilots disputed the airline's calculations, saying Thursday that "thousands of flights are still listed as unassigned."

On Friday, after pilots sat down with American's senior leadership, the union announced it had withdrawn a grievance, which said that American's initial solution to the staffing shortage violated the pilots' contract because of how it restricted overtime pay. American offered pilots 1.5 times normal hourly pay to give up vacation time and cover the unassigned flights.

Both sides expressed satisfaction afterward, although neither American nor the union would disclose details.

"We anticipate that American will be able to maintain a full December schedule as planned," the pilots group said. "Passengers can now count on American Airlines to take them to and from their holiday destinations around the globe."

Said American: "We are pleased to report that together, American and the Allied Pilots Association have put that worry to rest.

"We can assure customers that among the many stresses of the season, worrying about a canceled flight won't be one of them. In short, if Santa is flying, so is American."