Spirit Airlines
A Spirit Airlines airplane sits at a gate at the O'Hare Airport in Chicago, Oct. 2, 2014. Reuters/Jim Young

A union representing pilots of Spirit Airlines agreed to extend a temporary injunction directing them to get back to work after the airline cancelled some 300 flights earlier this week, the company announced Thursday. The two sides are currently negotiating a new permanent contract.

The temporary restraining order will remain in effect until both the sides approve a new contract or “if applicable, the parties are released from mediation by the National Mediation Board,” Spirit told International Business Times in an emailed statement.

Read: The Future Of Spirit And United And How Passengers React To Airlines' Bad Publicity

The airline added it urged its pilots to resume picking up extra flight assignments.

“On behalf of our customers and fellow Spirit team members, we really appreciate the effort of our pilots who are taking on open flying to restore the operation,” John Bendoraitis, Spirit Airlines’ chief operating officer, said in the statement.

On Tuesday, a court issued a temporary injunction directing the airlines' union pilots to get back to work.

Spirit cancelled dozens of flights Sunday due to a shortage of pilots. At the time, the airline maintained its pilots were not on strike despite having issues over a new collective bargaining agreement. However, with at least seven flights cancelled again on Monday, angry passengers at Florida’s Fort Lauderdale-Hollywood International Airport demanded answers over the situation from Spirit. Chaos erupted at the airport and police arrested several people involved in the commotion.

Spirit spokesman Paul Berry sent a statement Monday to IBT, which said: “We are shocked and saddened to see the videos of what took place at Ft. Lauderdale-Hollywood International Airport this evening. This is a result of unlawful labor activity by some Spirit pilots designed to disrupt Spirit operations for our customers, by canceling multiple flights across our network.”

“These pilots have put their quest for a new contract ahead of getting customers to their destinations and the safety of their fellow Spirit Team Members. It is for this reason, Spirit has filed suit in Federal Court to protect our customers' future travel,” Berry added.

Earlier on Monday, Spirit sued Air Line Pilots Association (ALPA) that represents the airline pilots and blamed the latter for “an unlawful job action” affecting the airline’s operations. In the past week, the airline canceled 300 flights affecting the travel plans of over 20,000 customers, according to a copy of the lawsuit provided by Spirit to IBT.

“On this past Sunday, May 7 alone, Spirit was forced to cancel 81 flights due to pilot unavailability, equaling approximately 17 percent of its scheduled flying for the day,” the airline stated in the lawsuit.

However, ALPA rejected the allegations made by Spirit in a statement to CBS News: "The Air Line Pilots Association, Int'l and the Spirit pilot group it represents are not engaged in a job action. Rather, ALPA and the Spirit pilots are continuing to do everything possible to help restore the company's operations, which have experienced significant problems over the past several days.”

“While we will continue these efforts, we will actively defend the association, its officers and its member pilots against the unwarranted and counterproductive legal action brought this evening by Spirit Airlines," ALPA said.