After a stellar run of soaring profits and huge stock price gains in 2015 and 2016, Volaris (NYSE:VLRS) hit the skids beginning in late 2016. Over the following two years, a combination of rising fuel prices, depreciation of the Mexican peso, periodic overcapacity in the Mexican domestic and transborder air travel markets, and the U.S. crackdown on illegal immigration drove massive erosion of Volaris' profitability.

Indeed, Volaris' adjusted operating margin, which stood at 11.7% in 2016 and 13.8% in 2015, came in just below breakeven in 2017 and fell further into negative territory last year. Not surprisingly, this caused the stock to plunge, too.

VLRS Chart

Volaris stock performance. Data by YCharts.

However, market conditions have improved dramatically over the past year. As a result, Volaris is capitalizing on its strong competitive advantages again, driving a rapid earnings recovery.

An excellent quarter

Volaris took advantage of strong demand to increase its capacity 21.6% year over year in the second quarter. Despite this substantial capacity growth, revenue per available seat mile (RASM) surged 10.1%. This caused revenue to jump 33.7%, reaching 8.3 billion pesos ($435 million).

Meanwhile, Volaris continued its efforts to steadily reduce its unit costs. Measured in pesos, nonfuel unit costs fell 4.6% year over year last quarter. Total unit costs declined 1.2%, as higher fuel costs -- related to new fees on jet fuel purchases imposed by Pemex in Mexico -- partially offset the decline in nonfuel unit costs.

The net result was that Volaris' operating margin improved by 10.5 percentage points year over year, reaching 7.9%. For the first half of the year, the company's operating margin rose 10.3 percentage points to 4.4%.

A Volaris plane taking off from a runway

Volaris' profit margin has surged back into positive territory this year. Image source: Volaris.

The guidance looks great as well

Volaris' comeback began in the second half of 2018, so the carrier will face tougher year-over-year comparisons in the current quarter and beyond. Nevertheless, management expects further earnings improvement in this seasonally stronger period.

For Q3, earnings before interest, taxes, depreciation, amortization, and rent (EBITDAR) should exceed 30% of revenue. For comparison, Volaris' EBITDAR margin was 26.7% in the year-ago period. It's also worth noting that Volaris easily exceeded its margin guidance in the first two quarters of 2019.

From a longer-term perspective, Volaris has plenty of potential margin expansion drivers. After receiving its first A320neo from Airbus in late 2016, Volaris has gradually grown its fleet of these ultra-fuel-efficient jets and will end 2019 with 21 in its fleet. That number is scheduled to rise to 57 by the end of 2022, driving big fuel efficiency gains. Thanks to its solid balance sheet, Volaris also got the best financing terms in its history for its upcoming deliveries.

On the revenue side, Volaris has been gradually refining its sales techniques to boost non-ticket revenue while keeping base fares low. Ancillary revenue per passenger has risen about 11% year-to-date, reaching approximately $27. This represents a more stable source of revenue than ticket sales, which are subject to volatility in fares. Management sees plenty of room for further growth in non-ticket revenue.

There's more upside for Volaris

Volaris' net income and earnings per share tend to be distorted by non-operating gains and losses related to currency movements. Operating profit is a better measure of the company's underlying results, because it ignores these currency impacts.

Over the past four quarters, Volaris has produced an operating profit of 1.26 billion pesos ($66 million). With strong revenue growth and ample margin expansion expected for the second half of 2019, there's a good chance that the carrier's full-year operating profit will exceed $100 million. That makes Volaris' $1 billion market cap look fairly modest.

More importantly for long-term investors, Volaris has a solid moat due to its scale -- it is now the largest airline in Mexico, measured by the number of passengers carried -- and industry-leading cost structure. Volaris has been able to reduce its unit costs almost continuously as it has grown, whereas most of its rivals are struggling and have been forced to trim their growth plans.

The Mexican air travel market is still far from maturity, with tens of millions of people never having traveled by plane. Using its low fares, Volaris is gradually convincing more and more Mexicans to travel by air rather than by intercity bus. With the domestic air travel market set to expand at a high rate for the foreseeable future, Volaris should be able to grow to many times its current size over the next couple of decades.

The rapid growth of the Mexican air travel market means that supply and demand can sometimes get out of balance, leading to volatility in Volaris' profitability. However, over the long term, Volaris should be able to deliver massive earnings growth for its shareholders.

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.