Despite the damage from a management-pilot dispute that spiraled out of control in May, Spirit Airlines (NYSE:SAVE) seemed to be in fairly good shape a month ago. After all, unit revenue had returned to growth, following more than two years of declines.

However, beginning in late June, industry fare competition became much more cutthroat. This change was instigated primarily by United Continental (NASDAQ:UAL), which is becoming very aggressive on pricing under its new leadership team. United's pricing actions have severely undermined Spirit's unit revenue outlook for the second half of 2017.

A decent second quarter

Last quarter, Spirit Airlines grew its revenue 20.1% year over year to $701.7 million, driven by a combination of double-digit capacity growth and a 5.7% increase in revenue per available seat mile (RASM). The timing of Easter certainly played a role in this strong result, but it wasn't the only reason why RASM returned to growth.

A Spirit Airlines plane

Spirit Airlines posted strong unit revenue growth last quarter. Image source: Spirit Airlines.

On the other hand, adjusted net income was roughly flat year over year, largely because Spirit's non-fuel cost per available seat mile (CASM) surged 10% year over year.

The pilot dispute was the main cause of this huge increase in unit costs. Spirit Airlines canceled hundreds of flights in the first half of May, and cancellations have remained above normal levels since then. As a result, Spirit has been spending a huge amount of money to rebook passengers on other airlines when it has had to cancel flights.

That said, Spirit's management estimates that if the pilot dispute had not occurred, non-fuel CASM would have risen just 2% year over year last quarter, well below its original guidance for a 3.5%-4.5% increase. In other words, Spirit's underlying revenue and cost trends were quite strong during Q2.

Weak guidance for the third quarter

In spite of the lingering pilot availability issues that are driving up cancellations, Spirit Airlines expects non-fuel unit costs to be roughly flat year over year in the third quarter. If the revenue environment had remained strong, this would have led to high earnings growth this quarter.

Unfortunately, a new price war has broken out. As a result, Spirit's guidance calls for a 2%-4% year-over-year decline in RASM this quarter. This includes a negative impact of 1.5-2.0 percentage points from the pilot dispute, which scared some customers away during the peak time for booking summer vacation tickets.

According to Spirit Airlines CEO Bob Fornaro, this uptick in price competition was concentrated in Chicago -- and to a lesser extent, Newark, Houston, and Denver. This makes it clear that United Airlines was the culprit, as it has hubs in all of these places.

Can United keep this up?

In the past few years, it has become common for legacy carriers to match the fares offered by ultra-low-cost carriers like Spirit Airlines. United Continental's president, Scott Kirby -- who held the same role at American Airlines until a year ago -- has been the industry's most vocal proponent of this tactic. More recently, United has actually started to undercut Spirit Airlines on some routes, forcing Spirit to lower its own fares.

There is some justification for legacy carriers to match budget carriers' prices in order to keep their planes full and avoid large market share losses. That said, United Continental has much higher unit costs than Spirit Airlines. It can't afford to sell very many tickets at bargain prices.

Indeed, United Continental expects to post an adjusted pre-tax margin of 12.5%-14.5% in Q3, down from 15.7% a year earlier. Moreover, the summer is the peak season for most of United's international routes, which face less competition from budget carriers. If it maintains its aggressive pricing tactics beyond September, it is likely to face even greater margin pressure during the fall and winter.

A United Airlines plane

United Continental's profit margin is declining. Image source: United Airlines.

Spirit's low cost structure is a big long-term competitive advantage

Though facing severe pricing pressure in some key markets, Spirit Airlines is still on track to post a solid pre-tax margin this quarter, most likely in the 16%-19% range. This demonstrates the power of Spirit's low cost structure.

Pricing wars will continue breaking out from time to time as legacy carriers react to the steady growth of lower-cost airlines. But in the end, Spirit Airlines will probably come out in a stronger position than its larger, high-cost rivals. Legacy carriers like United will eventually be forced to stop undercutting Spirit on price. When that happens, profits are likely to surge at Spirit Airlines.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.