It wasn't long ago that Air Canada (TSX:AC.B) had a real threat of insolvency on its hands. A pension deficit of more than $4 billion occurring in a time of record low interest rates had many investors fearing the Canadian flag carrier's second restructuring this millennium.

But fast-forward to today, and Air Canada's pension and share price are in a much improved situation. How did the airline do it, what does it mean for investors, and what could happen over the next several years?

A pension deficit in the billions, with a "B"
With a questionable economy and a pension deficit in the billions of dollars, Air Canada looked ripe to be burned by this liability. The years before had been a two-pronged attack on the airline's solvency. The slowing economy drove down air travel demand, while central banks were slashing interest rates.

Many economic models for dealing with recessions focus on cutting interest rates to boost growth. However, large companies with larger pension deficits see the size of their pension deficits dramatically increase under this scenario.

With pension issues threatening insolvency at Air Canada, the airline turned to the federal government for an exemption from the funding deadline for the pension plan. Rival carrier WestJet Airlines (TSX:WJA) noted its opposition to having the government give Air Canada an exemption from immediate full funding of the pension plan. A WestJet spokesperson expressed the carrier's view:

But at a general level, we are concerned about the impact on the state of competition caused by Air Canada repeatedly asking the federal government for special assistance, especially at a time when they are expanding their fleet, buying new aircraft, and have billions of dollars on the balance sheet.

Nevertheless, the federal government granted an exemption for Air Canada (after the airline's unions got on board as well) on the grounds that the collapse of Canada's largest airline would negatively affect the Canadian economy.

Pension turnaround
Last year was a great one for pension funds, as both the stock market and bond yields rose. The Globe and Mail reports that Air Canada's pension deficit, once topping $4 billion, fell to $2.8 billion by May 31 and is expected to fall another $1.1 billion after additional changes receive regulatory approval. The Globe also notes that 2013 helped other companies with pension deficits as well, including plane and train maker Bombardier (TSX:BBD.B), which saw an improvement of more than $660 million in its pension deficit.

Last year was also a turnaround year for Air Canada itself. Strong profits and positive views on cost cuts made Air Canada a multibagger investment, beating out almost every other major airline except for AMR, the bankrupt parent of American Airlines that traded over the counter. This improved outlook on the earnings side gives better hope to Air Canada's ability to pay down its pension deficit over time.

Going forward
Air Canada hasn't released all the up-to-date information on the state of its pension funding but is expected to provide more detail in its full-year results (expected Feb. 12, according to Air Canada's website). Trends for large pensions have been favorable in 2013, so I would expect these results to show significant improvement in the pension situation. While there are no guarantees, positive news on the pension front could provide another positive to Air Canada's results.

Farther into the future, Air Canada may be able to exit the pension relief program if favorable trends let the airline fully fund the pension plan. By doing this, the airline would be allowed to pay dividends and buy back shares once again. Although this does seem attractive at first, even if Air Canada eliminates the deficit, billions of dollars have already been committed to fleet modernization, which will likely use up most of the airline's spare cash.

Ready for flight
I have held my current shares of Air Canada since the summer of 2013, with occasional buys and sells in 2012. It has since proved to be one of my best investments, thanks in no small part to the airline's having gotten its pension problems under control.

Air Canada shares have risen sharply and may take some time to consolidate. However, I still see long-term upside at this airline from an improving economy, a reduction in pension issues, and international expansion.