As the U.S. military prepares to march into Iraq, the stocks of the defense companies that supply the battleships and fighter jets are weathering a slump that reflects investors' murky outlook for the industry.

Investors have turned sour on the country's defense and aerospace companies in the belief that the industry is facing the possibility of delays or cutbacks in certain defense programs, a decline in sales to Middle Eastern countries and pension-fund troubles. Companies such as Boeing Co. and General Dynamics Corp. that produce commercial aircraft are further burdened by the impact of the sluggish economy on airlines and corporate aircraft purchases.

After the Sept. 11, 2001, terrorist attacks, investors rushed into defense stocks expecting a fat increase in military spending that would bolster the companies' bottom lines. But after hitting a peak in May 2002, the Standard & Poor's aerospace and defense index has declined 32 percent.

"The stocks were overvalued to begin with," said Robert Friedman, aerospace and defense equity analyst for Standard and Poor's. "Even the short-term defense budgets are not growing as strong as consensus originally thought they would."

Friedman places a "sell" rating on the stocks of two of the industry's top players -- Lockheed Martin Corp. and Northrop Grumman Corp.

Still, the prospect of war is providing a modest boost to some contractors. General Dynamics Corp. saw an increase in orders for encrypted cellular phones late last year. Boeing more than doubled production in the past year of its Joint Direct Attack Munition, a kit used to turn unguided bombs into satellite-guided "smart bombs." But the kits, which played a big role in the war in Afghanistan, cost only $25,000 each. Even a significant increase in orders will have little impact on the revenue of a $54 billion industry goliath like Boeing, industry analysts said.

President Bush's budget proposal calls for a 4 percent increase in the Pentagon's fiscal 2004 budget, to $379.9 billion. But the U.S. government's budget deficit could put strains on future defense spending, industry analysts said. Some large weapons programs could be the victim of delays or cutbacks as Congress grapples not just with how to defend the nation but also with how to fund Medicare and other social programs, the analysts said.

The Persian Gulf War turned into a windfall for some defense contractors when Kuwait and Saudi Arabia went on a buying spree after the conflict, said Phil Finnegan, a defense industry analyst for the Teal Group. But now those countries cannot absorb new purchases and are focused on domestic issues, he said.

Like other industries, the defense sector is struggling with pension problems. Boeing made a "voluntary" contribution of $340 million last year to help offset an expected shortfall in 2004, according to a company spokeswoman. The company expects to make another contribution this year. Raytheon Co. made a cash contribution of $44 million last year and estimates that it will fund pension accounts with $57 million in 2003 and $357 million in 2004.

Although the defense companies' pension costs will be reimbursed by the government, investors still aren't convinced of the attractiveness of the companies' stocks. "It resulted in people not knowing how to value these stocks," said Byron Callan, a defense industry analyst for Merrill Lynch & Co.

Companies that straddle both the defense and commercial aerospace sectors are grappling with the impact of the economic downturn. Falls Church-based General Dynamics, which manufactures destroyers and armored tanks, derives about 25 percent of its revenue from production of Gulfstream business jets. Last week, General Dynamics lowered the number of business jets it expects to deliver this year to 77 from its previous target of 85. With war posing the prospect of sharper downturn in the airline industry, Boeing could see a further drop in demand for its commercial jets. Finnegan of the Teal Group said that Boeing may register a slight increase in sales of its Joint Direct Attack Munition kits or spare parts for F-18s "but that is going to be more than overwhelmed by the problems on the commercial side."

A Boeing spokeswoman said the war's impact on the company was unclear. "Without knowing the duration or level of the conflict, it is impossible to predict with any specificity how a war with Iraq would affect our business," Boeing said in a statement.