Spirit Airlines said Monday that it would delay delivery of new Airbus planes and furlough pilots as it seeks to overcome several setbacks, including a blocked merger, engine problems and a lackluster recovery from the pandemic.

The budget airline said in a statement that the new steps would save the company $340 million over the next two years.

Spirit has made several changes aimed at cutting costs and improving its financial position since a federal judge in January blocked its plan to merge with JetBlue Airways. The judge ruled that the proposed deal would harm consumers. Spirit and JetBlue gave up an effort to appeal that decision last month.

Spirit plans to delay most of the Airbus planes it had expected to receive in 2025 and 2026 by about five years. It also said it expected to furlough about 260 pilots starting Sept. 1. Those changes will help Spirit, which has lost money in each of the past four years, return to profitability, the company’s CEO, Ted Christie, said.

“Deferring these aircraft gives us the opportunity to reset the business and focus on the core airline while we adjust to changes in the competitive environment,” Christie said in a statement.

The airline has also been contending with a problem affecting the engines that power the most popular plane in its all-Airbus fleet, the A320neo.

Spirit was struggling even before the engine issue came to light. Some budget carriers, including Spirit, have had a tougher time because of intense competition and higher costs in the places where they operate.