Lockheed Martin (LMT 0.38%), the nation's largest defense contractor, demonstrated what's about to become a familiar pattern when it released its earnings on Tuesday. The company managed to bring in higher profits, with earnings per share growing more than 16% even though revenue fell 4%. In keeping with this trend, Lockheed Martin lowered its full-year 2013 revenue guidance by nearly 5% while raising its profit guidance by more than 2%. In an environment of deteriorating sales, Lockheed Martin has been boosting profits by aggressively cutting costs out of the business. Over the next week, Lockheed Martin's defense contractor peers will also report earnings, and investors should expect similar results. While that's good for investors in the short term, defense contractors can't cut their way to profitability forever.

Due to a complex of factors including the wars in Afghanistan and Iraq winding down, mounting debt and deficit concerns, and general political gridlock in Washington, D.C., American military spending has been falling recently. That decline is set to continue. The Department of Defense needs to cut about $50 billion from its 2013 budget, and slash another $30 billion in 2014. After that, military spending is projected to grow no faster than the rate of inflation, a poor proposition for companies that get their bread buttered by the Pentagon.

For many defense contractors, historically the U.S. government is either the only client or the only client that matters. There are three routes that these companies can take to deal with their major customer having a lot less money to spend. Lockheed Martin has made incredible progress boosting earnings through cutting costs, much of which was accomplished through layoffs and furloughs. This is not a sustainable trend. Lockheed Martin acknowledges this fact: On the quarterly conference call, CFO Bruce Tanner noted that the company could not keep up even its current segment operating margin of 12.8%, instead predicting operating margins above 11.5%. So the days of growing through shrinking may already be at an end.

Selling weapons and military equipment abroad to U.S. allies is another potential route to thriving despite the downturn in military spending at home. The trouble is that American military contractors need congressional approval to sell their wares to foreign states, restricting international deals to U.S. allies. There aren't enough U.S. military allies that have both the economic clout and the political will to buy enough military equipment to meet contractors' needs. For example, Lockheed Martin already derives about 15% of its revenue from international sales today, and its long-term goal for international sales is a relatively modest 20%. That's not a platform for sustained growth.

A better solution is for defense contractors to diversify away from military sales. It's no surprise that over the past few years the major military contractor with the best stock performance has been Boeing (BA -0.20%), which derives more than half of its earnings from commercial aviation. General Dynamics (GD -0.29%) has taken a page from Boeing's book, using its expertise in developing military systems to design and market business jets and information systems to civilian customers, which now account for more than 30% of revenue. In an environment of declining military spending, the most successful defense stocks will be those that can leverage technology and expertise designed for military platforms into civilian and commercial applications. With ample cash reserves and technological leadership in cutting-edge fields, major defense contractors should be able to pivot toward commercial sales. In the coming period of depressed military spending, their success will depend on their ability to do so.