NEW YORK, JAN. 25 -- The stock market moved higher today on war optimism, and oil prices fell slightly even though Iraq poured crude into the Persian Gulf.

Stocks prices were pressured briefly by renewed Iraqi missile attacks on Israel and Saudi Arabia, but further weak economic data encouraged hopes the Federal Reserve would lower interest rates to stimulate business and consumer spending.

On the New York Stock Exchange, the Dow Jones industrial average rose 16.34 points to close at 2659.41. Volume was 194.35 million shares. The Dow average rose a total of 12.63 points during the week.

"The news out of the Middle East is having a positive effect in the last couple days," said Tom Gallagher, head stock trader at Oppenheimer & Co. "Every new missile kill seems to impress the market as to how good the military is."

On other markets, oil finished slightly lower as traders sold off futures contracts to guard against sudden changes in the war over the weekend and the dollar was higher in quiet trading.

The mood for stock buying gained some encouragement today when the government reported that gross national product declined at an annual rate of 2.1 percent in the last three months of 1990. The decline was lower than some analysts had projected but still added impetus to hopes the Fed will relax credit by lowering interest rates to stimulate the economy.

But the bond market, which normally heads higher on bad economic news, weakened because many strategists had predicted that the GNP would drop 3.0 percent to 3.5 percent. A better-than-expected economy may lead the Fed to defer easing interest rates.

The government's 30-year bond was down 27/32 point in late trading. Its yield rose to 8.22 percent from 8.16 percent late Thursday.

On the New York Mercantile Exchange the benchmark light sweet crude oil fell 36 cents to $21.35 a barrel.

Gainers among blue-chip stocks included General Electric, up 1 3/8 at 59 7/8; IBM, up 1 5/8 at 122 5/8; AT&T, up 3/8 at 31 1/4; Philip Morris, up 3/8 at 54 7/8; and American Express, up 3/8 at 20 3/8.

As measured by Wilshire Associates' index of more than 5,000 actively traded stocks, the market increased $14.98 billion, or 0.48 percent, in value. The NYSE's composite index of all its listed common stocks gained 0.74 to 183.38. Standard & Poor's industrial index rose 1.36 to 396.58, and Standard & Poor's 500-stock composite index was up 1.29 at 336.07. The Nasdaq composite index climbed 2.95 to 394.28. At the American Stock Exchange, the market value index closed at 308.55, up 1.85.