Airline stocks soared in the second half of 2016, led by two of the three biggest companies in the industry: American Airlines and United Continental. Indeed, shares of American and United nearly doubled between late June and early December as investors started to gain confidence that unit revenue was ready to rise again after two years of steady declines.

The shares of smaller airlines like Alaska Air (ALK 1.28%), JetBlue Airways (JBLU), and Spirit Airlines (SAVE 0.25%) didn't rally nearly as much. Yet they have better long-term profit growth opportunities than their larger rivals. This makes them the three best airline stocks to buy for 2017.

Alaska Air starts to reap merger synergies

Last quarter, Alaska Air became one of the first U.S. airlines to return to unit revenue growth, with revenue per available seat mile (RASM) up 1.5% year over year. (Including Virgin America's results for the full quarter, RASM would have been down 0.2%.)

An Alaska Airlines plane

Alaska Air returned to unit revenue growth near the end of 2016. Image source: Alaska Airlines.

Unit revenue is on track to decline modestly in the first quarter of 2017, due in part to severe winter storms that hit the Pacific Northwest, as well as the timing of holidays. However, Alaska is in good position to return to RASM growth in Q2 as competitive capacity growth in its markets finally slows down. The rollout of Alaska Airlines' extra-legroom "Premium" seating this year will also contribute to RASM growth.

Meanwhile, Alaska Air has started the integration process for its Virgin America acquisition. The recent announcement that it will phase out the Virgin America brand made big headlines, but that won't happen until 2019. For now, Alaska is focused on driving revenue synergies by adding flights in Virgin America's hometown of San Francisco.

In total, Alaska Air expects to capture $225 million in annual merger synergies by the end of 2020. It also continues to grow capacity at a high-single-digit rate. As a result, Alaska Air could potentially produce double-digit compound annual EPS growth over the next few years.

JetBlue will make a mint on premium flights

JetBlue Airways stock has struggled for the past year and a half as the company's unit revenue performance has cooled off. During 2016, RASM fell 5% as the carrier expanded a bit too quickly. For Q1 2017, JetBlue expects RASM to fall an additional 4%-5%. Like Alaska Air, JetBlue was hit hard this quarter by holiday calendar shifts.

JetBlue is slowing its growth during 2017 in order to stabilize unit revenue. Furthermore, it is about to accelerate the expansion of its Mint premium service.

The Mint premium cabin on a JetBlue airplane

JetBlue's flat-bed Mint premium seats will come to more routes soon. Image source: JetBlue Airways.

Customers have fallen in love with the flat-bed premium seats JetBlue offers on several cross-country routes. RASM has surged on JetBlue's first two Mint routes, which connect New York to San Francisco and Los Angeles. JetBlue successfully expanded Mint to its Boston-San Francisco and Boston-Los Angeles routes last year.

Last week, JetBlue added a new cross-country Mint route connecting Fort Lauderdale to Los Angeles. Six new Mint routes are on the horizon, all of which are likely to launch between now and mid-2018. As Mint grows as a proportion of JetBlue's capacity, unit revenue should trend higher.

JetBlue is also working to keep costs down. Last fall, the company announced a plan to achieve $250 million to $300 million in annual structural cost savings by 2020. JetBlue will also start to retrofit its A320 fleet with additional seats later this year. As a result, JetBlue expects non-fuel unit costs to increase no more than 1% annually from 2018-2020.

With improving revenue and cost trends, JetBlue's profit margin is primed to rise again. As this starts to show up in the company's results -- probably in the second half of 2017 -- JetBlue stock could surge higher.

Spirit Airlines zeroes in on unit revenue growth

Finally, Spirit Airlines has experienced the biggest unit revenue slump in the industry. RASM plunged 14.7% in 2015 and fell another 9.6% in 2016. It's remarkable that Spirit earned a 19.8% adjusted pre-tax margin last year despite these steep unit revenue declines.

Fortunately, the unit revenue declines have been slowing for the past few quarters. RASM will probably decline 4% to 5% in Q1, due to a blip in demand early in the year, as well as the impact of a later Easter holiday. However, Spirit has said that it expects RASM to return to growth next quarter and continue rising for the rest of the year.

A Spirit Airlines plane

Spirit Airlines is on pace to return to unit revenue growth in Q2. Image source: Spirit Airlines.

Meanwhile, Spirit expects its non-fuel unit costs to decline modestly this year. And while fuel prices were up significantly year over year in the first quarter, the company will face much smaller fuel-price increases going forward.

Spirit Airlines is working on numerous initiatives to produce steadier unit revenue increases in the future while keeping costs low. This provides a solid foundation for the company's aggressive growth plans.

Small and nimble is good

Alaska Air, JetBlue Airways, and Spirit Airlines all have far greater growth prospects than their larger rivals. They also tend to generate higher profit margins. Yet their shares aren't trading at a significant premium right now. This makes Alaska, JetBlue, and Spirit the three best airline stocks to buy in 2017.