The long history of the stock market tells us one of the best things you can do with your money is buy dividend stocks. Time and again studies show dividend stocks outperform nonpaying ones by healthy margins, and even when the market has generated negative returns across certain decades, income-generating stocks still produced gains.

Several years ago, J.P. Morgan Asset Management found that stocks that initiated and then raised their payouts over a 40-year period between 1972 and 2012 returned an average of 9.5% annually, versus just 1.6% for non-dividend-paying stocks. Over rolling three-year periods, the higher-yielding securities beat the low- and non-dividend-yielding securities about two-thirds of the time.

M1A2 Abrams tank.

Image source: General Dynamics.

It's one of the reasons why I think the defense industry is an excellent place to look for investments for a lifetime of passive income. They are in an essential industry that may see the rate of growth ebb and flow over the years, but it's a rare period when defense expenditures will actually get cut. These are solid businesses offering generally stable growth that also tend to throw off equally dependable income streams for investors. 

The following pair of defense stocks are great companies to own for the long term.

General Dynamics

General Dynamics (GD -1.08%) is the third-largest defense contractors behind Lockheed Martin and Raytheon Technologies, and the latter was only catapulted into second place by its acquisition of United Technologies in 2020.

General Dynamics generated $38.5 billion in revenue last year, 79% of which came from defense contracts for military hardware such as nuclear submarines, the M1A2 Abrams tank, the Stryker combat vehicle, and assorted weapons systems including heavy machine guns and grenade launchers. The remainder comes from civilian business, primarily commercial jets sold under the Gulfstream banner, and it generated over $8.1 billion in revenue last year.

Both areas of focus have been lucrative for General Dynamics, helping to support its dividend. Earlier this year the defense contractor raised its quarterly payout 5.9% to $1.26 per share, or $5.04 per year, the 25th consecutive year it increased the dividend.

The yield is a healthy 2.2% annually, and with shares trading at 16 times next year's earnings estimates, 1.7 times sales, and 15 times the free cash flow it produces, General Dynamics offers a great way to invest in defense with your portfolio.

3M

You don't normally think of 3M (MMM -0.01%) as a defense industry stock since it's best known for its Post-It notepads, Scotch brand tape, and -- more recently -- N95 masks. But it also supplies products and services to the military, from protective solutions for surfaces and equipment to communication headsets, high visibility apparel, and eyewear.

3M has been around for over 100 years and has weathered all kinds of economic markets and geopolitical events, and it remains a solid, growing $81 billion business. It generated $35.4 billion in sales last year, up 10% from the year before, with operating income growing 3% to $7.4 billion.

Notably, 3M has paid investors a dividend for virtually that entire time, and it has raised the payout for 64 straight years, which places it among a select group of stocks called Dividend Kings

Through recessions and depressions, world wars and pandemics, 3M has persevered and will continue doing so as it pays its shareholders a stream of revenue over the course of their lifetimes.