LAS VEGAS (AP) — A federal appeals court says Allegiant Air had the right to make changes in work rules for its pilots.

It's the latest development in a dispute that nearly led to a strike earlier this year at the low-fare airline.

Allegiant pilots are angry over changes that the company made in crew-scheduling rules and benefits that had been negotiated by some of the pilots before they joined a union.

On Monday, three judges on the 9th U.S. Circuit Court of Appeals ruled that the pilots who negotiated the rules were not an official collective bargaining agent. Because of that, the judges say, the company was within its rights to change the rules.

The pilots are now represented by the Teamsters, which sued the airline.

Shortly after the Teamsters' victory, Allegiant changed policies for pilots who lost medical clearance because of illness or wanted to take parental leave, and it created a new scheduling system.

Monday's ruling overturned a July 2014 decision by a district court judge, who ordered the airline to restore the old rules. The pilots threatened this year to walk off the job in protest over the dispute, but another federal judge in Las Vegas blocked the strike. Federal law makes it difficult for airline workers to strike.

The airline, part of Las Vegas-based Allegiant Travel Co., has about 500 pilots.

Allegiant shares fell $5.59, or 3.4 percent, to close at $160.29. Airline stocks were battered over renewed investor concern that the carriers are adding too many flights which could lead to lower fares and profits.

Two calls were placed to seek comment from the pilots, but there was no immediate response.