A recent scheduling glitch had left American Airlines scrambling to find pilots for thousands of flights over the Christmas period. The airline said Friday the issue had been resolved. (Lynne Sladky/AP photo/File)

American Airlines and the union that represents its pilots announced late Friday that they had resolved a scheduling error that had put thousands of flights at risk of cancellation during the busy December travel season.

“We are pleased to report that together, American and the Allied Pilots Association have put that worry to rest to make sure our flights will operate as scheduled,” the airline said in a statement. “By working together, we can assure customers that among the many stresses of the season, worrying about a canceled flight won’t be one of them.”

A collective shudder went through prospective holiday travelers on Tuesday when reports surfaced that problems with the airline’s computerized scheduling system left some flights without pilots. American declined to say how many flights were affected, but the Allied Pilots Association, which represents 15,000 pilots at the airline, said that more than 15,000 flights were at risk of being grounded.

The bulk of those cancellations were between Dec. 17 and Dec. 31, and the affected airports included the airline’s biggest hub, Dallas-Fort Worth, as well as flights at Washington’s Reagan National, Boston’s Logan International, Miami International, New York’s LaGuardia, Philadelphia International, Salt Lake City International and Charlotte Douglas International.

American hoped to lure pilots back to work by offering them 150 percent of their regular salary — a move that angered the union, which had not been consulted about the plan.

On Wednesday, when a spokesman for the airline announced that only “a few hundred flights” were without pilots — the union quickly disputed that number, saying thousands remained understaffed.

But it appears that by Friday the differences had been resolved.

A statement addressed to pilots and posted on the union’s website indicated that their concerns had been resolved following a meeting earlier in the day with airline officials.

“APA and management have reached an agreement in principle addressing our respective needs, and we have withdrawn our grievance,” the statement read. “With this agreement in principle, we anticipate that American Airlines will be able to maintain a full December schedule as planned for its passengers.”