Allegiant Travel Co said after the court order that it expects all flights on Thursday to operate as scheduled, avoiding a strike that could have snarled the travel of more than 33,000 customers ahead of a holiday weekend.

Allegiant sued the pilots union in U.S. District Court in Las Vegas on Monday, saying it had violated the Railway Labor Act by moving to strike before the parties had exerted every effort to settle their disputes.

The court on Wednesday granted the Las Vegas-based company's request to halt the strike because Allegiant had "shown a likelihood of success" in its lawsuit and "would suffer irreparable harm in the absence of temporary relief," according to the ruling.

"The injunction furthers the public interest by insuring the continued operation of air travel on a major carrier," the ruling added.

The pilots union, Airline Professionals Association Teamsters Local 1224, has until Monday to respond to Allegiant's claims, the ruling said.

"Although we know that our strike to restore the status quo is legal, we will comply with the judge's decision and look forward to having our voices heard at the upcoming hearing," Allegiant pilot Corey Berger said in a statement.

The union said Allegiant had not abided by a July 2014 federal court injunction that directed the airline to restore the pilots' benefits and work rule protections to previously negotiated levels.

The union said this violation made its strike legal. More than 98 percent of 473 participating pilots voted in January to authorize a strike.

"With the threat of an imminent strike over, Allegiant hopes that both parties can now focus on the next federally mediated negotiating session, scheduled for late April," the company said in a statement.

Contract talks have taken place for more than two years without success.

(Reporting by Jeffrey Dastin; Editing by Leslie Adler)

By Jeffrey Dastin