Following the terrorist attacks of September 11, the realization that this country had gaping holes in its security systems led to the creation of the Department of Homeland Security. While there is some criticism about the largesse that has been wasted as the agency has found its footing, a whole industry has sprung up around defending our borders and ensuring everyone's health and safety.

Of course, behemoth corporations like Boeing (NYSE:BA), Lockheed Martin (NYSE:LMT), and Raytheon pull down generous portions of the $40 billion Homeland Security budget, but with more than $18 billion being awarded to state and local governments, the greatest innovations are being found among small-cap companies.

InVision Technologies, a top supplier of airport bomb-detection equipment, became a poster child of what the "homeland security dividend" could pay investors. It was purchased for $900 million by General Electric this past December, though it just recently paid a $1.1 million fine to settle fraud charges stemming from bribes it paid to Thailand to get its equipment used there.

The stock of Armor Holdings (NYSE:AH), a manufacturer of protective equipment for military and law enforcement personnel with a $1.5 billion market cap, has risen fourfold over the past two years as the need for the products has grown. Shares of the company's much smaller brethren, Ceradyne (NASDAQ:CRDN) and DHB Industries (AMEX:DHB), a Stocks 2004 selection, have risen over 600% in the same time period.

The same rigorous selection process that Motley Fool co-founder Tom Gardner used to pluck DHB out of obscurity, he also uses every month in his Motley Fool Hidden Gems newsletter. Over 70 different metrics of the business, management, competition, and valuation are considered before a company is given the Hidden Gems imprimatur. Such careful consideration has led to market-beating returns of more than four to one!

Even companies that hover between the micro-cap and small-cap range are finding homeland security to be profitable. At tiny TVI (NASDAQ:TVIN), a manufacturer of quickly deployable shelters for the military, first responders, and hospitals, revenues rose 29% to $38 million this year based on contracts secured through Homeland Security budgets. Yet with a market cap just north of $130 million and a stock price below $5 a share, it teeters on respectability.

CompuDyne (NASDAQ:CDCY), a $42 million manufacturer of blast-proof windows and doors, as well as security systems used to protect embassies and sensitive buildings around the world, is one company whose stock has bucked the trend and actually trades for less than it did back in 2003.

What it comes down to is that investing in our nation's defense is not only vital, but can be quite profitable, too. Not every company that bills itself as being in the Homeland Security industry will ultimately win the war of investor success.

Become secure in your knowledge of these other related articles:

Want to secure extraordinary profits from extraordinary companies? Try a 30-day free trial to Hidden Gems today!

Fool contributor Rich Duprey wages war daily against a growing waistline. He owns shares in TVI, but does not own any of the other stocks mentioned in the article.