Solid orders for its defense and space business helped Boeing (BA 0.39%) make it through the Great Recession in one piece, despite a drop in commercial airplane demand. However, in recent years, Boeing's defense business has been under pressure because of caps on U.S. military spending and a few key contract losses.

Indeed, just a year or two ago, the future looked pretty grim for Boeing's defense business, as the company was on track to run out of fighter orders by the end of the decade.

However, Boeing recently finalized a slew of fighter orders, with more under consideration. Meanwhile, deliveries of its new military tanker are finally scheduled to begin in late 2017. This could make the defense business a growth driver for Boeing once again -- at least for the next few years.

Boeing will deliver the first KC-46 Pegasus military tanker to the Air Force in 2017. Image source: Boeing.

Boeing's defense business stagnates

Boeing bulked up its defense segment two decades ago by merging with McDonnell Douglas. The McDonnell Douglas-developed F-15 and F/A-18 fighters have been the centerpieces of Boeing's military aircraft lineup ever since.

However, in 2001, Boeing rival Lockheed Martin (LMT -0.55%) won a $200 billion contract for the new F-35 Joint Strike Fighter. As a result, Boeing recognized that its fighter business wouldn't last forever.

More recently, Boeing teamed up with Lockheed Martin in a bid to build a next-generation bomber for the U.S. However, Boeing and Lockheed lost the competition to Northrop Grumman last year. An appeal was turned aside in early 2016. This was a disappointing loss, as there are only a few big military aircraft programs coming up for bid in the foreseeable future.

In addition, the C-17 Globemaster military cargo plane -- which also came to Boeing as part of the McDonnell Douglas acquisition -- finally ran out of orders last year, leading to the closure of the Long Beach factory where it was built.

As a result, revenue for Boeing's defense, space, and security segment (known as BDS) peaked in 2013 at $33.2 billion. By 2015, BDS revenue had declined to $30.4 billion. Through the first nine months of 2016, the segment's revenue is flat year over year.

Boeing's fighters soldier on

Fortunately, Boeing has been able to stave off the end of fighter production by winning a series of foreign orders. Most recently, it sold 36 F-15s to Qatar and 28 F/A-18 Super Hornets to Kuwait. Together, those aircraft deals are worth $7 billion. Including weapons, support, and options to acquire additional planes, the value of these contracts could exceed $30 billion.

Boeing is still seeing plenty of demand for its aging fighter models. Image source: Boeing.

Additionally, Lockheed Martin's F-35 has been a disaster from the start. It still isn't fully ready for service, while the total program cost has nearly doubled from the initial estimate. The U.S. was supposed to have received more than 1,000 F-35s by now, but Lockheed Martin had only delivered 179 as of earlier this year.

As a result of these delays and cost overruns, Canada canceled its plan to acquire F-35s a few years ago. Last month, it announced that it wants to purchase 18 F/A-18 Super Hornets to replace some of its aging Hornet fighters. The U.S. Navy is also interested in acquiring dozens more F/A-18 Super Hornets from Boeing because of the delayed availability of Lockheed Martin's F-35.

If all of these orders go through, Boeing may be able to keep both of its fighter jet production lines running well into the 2020s. Furthermore, these additional aircraft sales will generate billions of dollars in long-term support and services revenue.

Tanker production set to ramp up

While BDS' fighter jet business is declining more slowly than previously expected, its military tanker business is about to ramp up. Although Boeing has faced cost overruns and modest schedule delays for its KC-46 Pegasus, the first delivery is now on track for the second half of 2017.

The U.S. Air Force plans to acquire 179 KC-146 tankers over the next dozen or so years, for an estimated cost of $40 billion. Including potential follow-on orders from the Air Force and international orders, Boeing believes the total opportunity is twice as large. And of course, the KC-46 is likely to generate huge sums of support and services revenue for decades to come.

The combination of rising tanker sales and ongoing fighter production could drive modest growth for Boeing's defense business over the next several years. The commercial jet business will still deliver the lion's share of Boeing's revenue and profit, but it won't be working alone. With demand for some key aircraft types slowing down recently, that's welcome news for Boeing shareholders.