Boeing BA and its investors likely couldn’t be happier with the first-quarter 2014 earnings report it issued last week: Revenue rose 8% over the year-ago quarter, operating margins widened, and 2014 guidance got boosted. The U.S. aerospace company ramped up deliveries for its 787 and 737 models to keep pace with demand, which in turn increased cash flow beyond analyst expectations. And a $374 billion backlog of more than 5,100 aircraft guarantees that even if Boeing stopped booking new orders today (and it surely will not; the company booked 235 new commercial jet orders during the quarter) it would take nearly a decade to deliver all the planes on order.

But though Boeing brass didn’t linger on the topic during last week’s earnings call, things don’t appear quite so rosy in Boeing’s Defense, Space & Security division. Defense revenues slipped somewhat in Q1. With the Lockheed Martin-built F-35 set to replace various workhorse aircraft across the U.S. military (and the fleets of many of its allies) and overall reductions in big-ticket military buys across the globe, Boeing faces the closure of at least two major production lines (the C-17 cargo carrier and U.S. Navy workhorse F-18) and pressure on at least a few more. It also faces reduced service contracts and other ancillary revenues as other legacy systems approach end-of-life status.

A slowdown in Boeing’s defense business is no insignificant matter for the company. (In some years, it accounts for as much as half of the company’s total revenues.) Aerospace analysts have voiced concerns that the defense segment is the Achilles heel to the company’s otherwise flourishing commercial jet business. But the BDS division isn’t taking its punches lying down. 

“There’s a confluence of Boeing programs slowing down, if not coming to an end,” says Brian Foley, an independent aerospace industry analyst and president of Brian Foley Associates. “It seems pretty firm that the C-17 program will be closing down its Long Beach facility in the middle of next year. The F-15 and F-18 are slowing down and could be coming to an end. The V-22 isn’t always a clear long-term survivor in people’s minds either. But I think you have to look at the military section of Boeing as an ongoing process. It’s not static.”

MORE: Just call Steve Jurvetson ‘rocket man’

Many of the factors affecting Boeing’s defense business lie outside of its control. Still, the company is retrenching and striking back. In recent months, Boeing’s 57,000-strong defense team has introduced products that diversify its portfolio away from the traditional aircraft for which it is known, aggressively shopped its existing platforms to foreign buyers, and even taken a few swings at the new F-35, declaring its existing EA-18G Growler — a variant of the F-18 suited to electronic warfare — a more capable electronic warfighter than the U.S. Department of Defense’s prized next-generation, all-purpose fighter.

“It has been purposeful,” says Chris Raymond, vice president of business development and strategy for Boeing Defense, Space & Security. “We’ve been trying to prepare for the environment we saw ahead of us. We knew that would require us not to diversify outside of defense and security but to diversify inside of it. Some needs and buying practices are adjusting, and there are a few areas that are non-traditional that we’re taking a look at.”

Those areas include energy, underwater autonomous vehicles, and ground vehicles. Late last year, Boeing unveiled the Phantom Badger, a versatile four-wheeled truck/transport designed to deploy from the cargo bay of the V-22 Osprey tilt-rotor aircraft (a Boeing product in collaboration with Bell Helicopter), marking a noticeable departure from Boeing’s core aircraft manufacturing business. (Previously, the company’s best-known ground vehicle was likely the Lunar Roving Vehicle that traveled to the moon on several of the later Apollo missions. As you can imagine, Boeing didn’t sell very many.) 

The BDS division is also looking at boosting revenue through support services on its existing platforms, Raymond says, and it may move beyond that. “On the support side, looking forward we’re trying to diversify a bit,” he says. “Sometimes that means just bundling your services together differently, especially internationally. And in some areas we’ve even looked at where we can do work on non-Boeing platforms or provide services on non-Boeing fleets.”

MORE: Why Google and Facebook are drooling over drone companies

But not everyone is convinced diversifying products and services will be enough to keep Boeing in its position as the nation’s No. 2 defense contractor, behind — you guessed it — Lockheed Martin   LMT . Richard Aboulafia, vice president of analysis at the Virginia-based aerospace consultancy Teal Group, invokes former Lockheed CEO and former undersecretary of the Army Norm Augustine, who once observed that the “industry’s record of diversification is unblemished by success.”

“I’m not as optimistic as I was a few years ago for a variety of reasons,” Aboulafia says of BDS’s near-term prospects. “Their broader ability to sustain the profits and revenue they’ve been enjoying looks less likely.”

Aboulafia cites the broader softening of the defense spending environment and, in particular, a softening in the rotorcraft segment as reasons for concern. Further, the likely slowing or outright demise of the C-17, F-18, and F-15 production lines threaten to impede the division’s overall trajectory.

But don’t count the company out. BDS is pursuing several large opportunities that, if successful, would secure it another major, high-volume military aircraft production program. The first is the U.S. Navy’s UCLASS (or Unmanned Carrier Launched Aerial Surveillance and Strike) program, which aims to field an unmanned fighter jet that can launch and recover aboard an aircraft carrier by 2020. Boeing, Northrop Grumman NOC , Lockheed Martin, and General Atomics will all vie for that contract, the final requirements of which are expected this year.

MORE: ‘Drone law’ becomes big business

The second and arguably more important is the U.S. Air Force’s long-awaited Long Range Strike Bomber program, which is expected to carry a $100 billion price tag for roughly 100 airframes, each of which will require service for decades to come. A Boeing-Lockheed collaboration is competing with a Northrop Grumman proposal for the bomber contract, whose requirements will also likely be released in the next year.

An easy way out of sluggish growth for Boeing would be a merger or acquisition of a smaller peer company, Aboulafia says, such as Northrop Grumman, which is emerging as a leader in unmanned, autonomous flight. That deal would more or less ensure that Boeing wins the long-range bomber contract and put it in a good position to win the UCLASS contract. Still, BDS is working to defend its place in the defense marketplace, and failure to land the contract for one of these next-generation programs would put it in a place it clearly doesn’t want to be.

With domestic defense spending tightening, U.S. defense contractors are increasingly looking for customers abroad. It is in the international market that Raymond feels BDS has a particular advantage — an environment where it can be an advantage to sell something that is effective but doesn’t carry the price tag of the latest and greatest. And through its thriving civilian jet business, Boeing has relationships with foreign governments and companies that could translate into deals.

“There’s a lot of market intimacy you need to bring to that,” Raymond says. “And we have that through our commercial business.”

Clarification, May 2, 2014: An earlier version of this story inferred that Boeing P-8 production was slipping. According to Boeing, it is currently on schedule.