Spirit Airlines said Tuesday it has won a temporary restraining order from a federal judge in Florida, after the carrier accused its pilot union of “purposely” hurting its operation with what it said were coordinated actions designed to cancel and delay flights.

Spirit filed a complaint Monday in the Southern District of Florida, after it said it had been forced to cancel roughly 300 flights over one week because of pilot actions. Its complaint named the Air Line Pilots Association, or ALPA, as a defendant, saying the group did little to stop what the company called a work slowdown.

The airline and the pilots are in the midst of contentious contract negotiations, and Spirit told the court pilots have been refusing to work extra flights, even when management wants to pay them more money. In the past, the airline said, pilots regularly picked up extra trips. The Railway Labor Act generally requires union workers to maintain the status quo for work habits during labor negotiations.

The last week has not been good for Spirit, which claimed in court papers that it had lost more than $8 million in revenue during a one-week period. Customers have complained on social media about delayed and canceled flights, and on Monday night, frustrated customers rebelled at Fort Lauderdale’s airport. According to a Washington Post report, more than 500 people became “become enraged, fearful, or visually upset.” A police report said the altercation “resembled the start of a riot,” the Post said.

“We sincerely apologize to our customers for the disruption and inconveniences they have suffered,” Spirit spokesman Paul Berry said in a statement on Tuesday. “We believe this is the result of intimidation tactics by a limited number of our pilots affecting the behavior of the larger group. We are also shocked and saddened by the events that took place yesterday at Ft. Lauderdale/Hollywood International Airport and at other airports across our network.”

In a statement, the union said it will comply with the court.

“The court has spoken and Spirit pilots will fully comply with the order handed down, which is completely in line with our overriding goal: the resumption of normal operations,” the statement said. “We call on the company to join forces with ALPA and the Spirit pilots to do just that.”

Spirit said it is now focused on securing a preliminary injunction from the court. The next hearing is May 15, the airline said.

Photo Credit: Police responded Monday to reports of unhappy Spirit Airlines customers in Fort Lauderdale. The company is blaming its pilots union for causing tension. Associated Press