The war in Ukraine and escalating tensions in the Middle East have contributed to heightened interest in defense stocks. Like oil stocks, these can be a hedge against geopolitical conflict. But while military spending and energy security are top of mind, it's not a good idea to jump in and out of defense stocks.

A better approach is to find quality businesses that generate stable earnings from the U.S. government, secure valuable long-term contracts, and have healthy backlogs that can support future business. Lockheed Martin (LMT -0.75%) checks all those boxes and then some. And it just raised its dividend to a record high.

Here's why it is a buy now.

A person welding sheet metal.

Image source: Getty Images

A primer on Lockheed Martin

The U.S. Government contributed 73% of Lockheed Martin's 2022 consolidated sales. The rest of the business comes mainly from international customers (approved U.S. allies) and U.S. commercial customers.

Lockheed Martin operates four segments. Aeronautics is the biggest, led by its F-35 fighter jet program, which generated 27% of the company's consolidated sales last year. In 2022, Lockheed Martin finalized a $30 billion contract with the U.S. Department of Defense for 398 F-35s.

The Missiles and Fire Control segment has been the standout in recent years, providing missiles, rocket systems, control systems, and logistic services to Ukraine. Then there is the Rotary and mission systems segment, which makes air and missile defense systems, control systems, communications, sensors, and support systems. Finally, the space segment makes satellites, space transportation, hypersonic missiles, and defense systems.

Lockheed Martin's growth is dependent on increased defense spending. The defense budget isn't just about making the military bigger, it's also about making sure the U.S. and its allies maintain military superiority. The pressure is on Lockheed and other defense contractors to continue innovating. Companies that fall behind may lose contracts to the competition, while companies that continue advancing stand to gain business over time.

Lockheed Martin is in a good position

Lockheed Martin has a well-diversified business that is anchored by the F-35 fighter jet program. As of the end of the third quarter, it also has a massive backlog of $156 billion for domestic and international orders. For context, the company generated $66 billion in 2022 sales.

As my colleague Lee Samaha points out, Lockheed's greatest challenges are slowing growth and margin pressure. Inflation effectively dilutes the value of fixed-price long-term contracts. As input costs become higher, the margin on business tied to fixed-price contracts shrinks. The good news is that new contracts will adjust for changes in cost and inflation. And so the defense industry is somewhat more protected from inflation than other industries.

It's also worth pointing out that Lockheed has a relatively high operating margin compared to its peers, giving it a cushion in case margins compress.

LMT Operating Margin (TTM) Chart

LMT Operating Margin (TTM) data by YCharts

Some downsides worth considering

The two biggest challenges for a defense contractor like Lockheed Martin is that it depends on U.S. defense spending for its growth, and that growth has been fairly low in recent years.

Over the last five years, revenue is up just 25.4% and operating income is up just 18.1%. And if we look back over the last 10 years, revenue is only up 48.6% and operating income is up 106.9%. That's just a 3.91% compound annual growth rate (CAGR) for revenue and 6.92% for net income.

LMT Revenue (TTM) Chart

LMT Revenue (TTM) data by YCharts

When operating income growth outpaces revenue growth, that means margin expansion -- which is a good thing. But considering Lockheed is such a low-growth business, investors may not want to pay a premium multiple for the stock. And they haven't been.

Lockheed has a price to earnings (P/E) ratio of just 16.2 compared to a 10-year median P/E of 17.8. So its present and historical valuation have consistently lagged the valuation of the broader market.

Driving shareholder value

Lockheed's value isn't in its growth rate, but rather its stability. It gets the majority of its business from arguably the most reliable customer on the planet -- the U.S. government. It then uses those stable cash flows to support a sizable buyback program and a growing dividend.

Over the past decade, Lockheed has reduced its outstanding share count by 22.7%, which has helped keep its P/E ratio low despite modest earnings growth and a higher stock price. Lockheed Martin also doesn't get enough credit for its dividend. The company has paid and raised its dividend every year since 2003. And the raises have been fairly sizable too.

On Oct. 6, Lockheed announced a 5% bump-up in its quarterly dividend -- from $3 to $3.15 -- marking the 21st consecutive year of payout increases. That puts the company on track to pay $12.15 in dividends per share in 2023, or more than double the $5.49 it paid 10 years ago in 2014 and nearly a 50% increase in just five years.

There aren't too many companies the size of Lockheed Martin that are buying back stock and raising dividends at such a torrid pace. The best part is that these raises and buybacks are affordable. For the last 10 years, Lockheed Martin has, for the most part, maintained a payout ratio below 50%.

An investment in value and income

Lockheed Martin stock trades at a discount to the S&P 500, and for good reason given its low growth. But its reliable earnings make it an excellent dividend stock that can be counted on for reliable passive income.

What's more, the buybacks help ensure its valuation doesn't get too high even if the stock price goes up. With the stock trading at a P/E ratio of just 16, investors have the chance to get a great price for Lockheed Martin and some added protection against geopolitical uncertainty.