Oil prices rose almost $3 a barrel yesterday in a rally that analysts said had as much to do with technical trading strategies as it did with concerns about reports of major fires in Kuwaiti oil fields and a new Iraqi attack on Israel.

The attack on Israel had a more direct effect on the stock market, with some prices falling sharply at the end of the day as television carried reports of the injuries and damage caused by a Scud missile assault on Tel Aviv.

The Dow Jones industrial average finished the day with a 25.99-point loss to close at 2603.22, but other market indicators were mixed.

Analysts said much of the oil market's increase represented a continuation of Monday's rebound from the lows of late last week, when the price of crude oil plunged by almost $13 a barrel in two days. Many traders believed the market was "oversold" and bought back in.

"The war wasn't over in a day, as people initially thought, so there was some recovery here that I would view as technical in nature," said Michael McDermott, an oil futures broker at Paine Webber Inc. in New York.

In addition, experts noted, yesterday was the last day of trading in the New York Mercantile Exchange's futures contracts for February delivery of crude oil, forcing many traders to buy contracts to cover their obligations.

This trading caused the February contract price to gyrate wildly in the last few minutes of the session, moving abruptly between $22.80 and $24.90 a barrel. The contract closed at $24.18, a $2.88 increase.

The futures prices are commonly used to determine prices of crude oil sold to refiners. Traders said oil moved up initially following news reports about the damage to three Kuwaiti oil fields. Since Kuwaiti oil production has been out of service since August, the damage poses no immediate threat to world oil supplies, leading many analysts to discount its effect on prices.

But other experts said the damage unsettled traders, reviving fears about the potential risk to oil fields in Saudi Arabia and the rest of the Persian Gulf.

The afternoon attack on Israel also heightened concerns that the war might escalate, traders said.

On the stock market, much of the sell-off came in blue-chip issues, as reflected in the Dow average. But there were slightly more advancing stocks than declining issues on the New York Stock Exchange.

Federal Reserve Chairman Alan Greenspan disappointed many stock traders by telling a congressional committee that an aggressive lowering of interest rates could be "counterproductive."

A report that two large West Coast banks, Wells Fargo & Co. and Security Pacific Corp., had held merger talks pushed those two issues higher in active trading and buoyed other financial services and banking stocks that might benefit from mergers. Wells Fargo rose 2 1/4 to 56 7/8 and Security Pacific was up 1 5/8 to 20 1/2.

Standard & Poor's industrial index lost 2.63 to 386.11, and S&P's 500-stock composite index closed at 328.31, off 2.75.

The NYSE's composite index of all its listed common stocks lost 1.18 to 179.20. Nationwide consolidated volume in NYSE-listed issues totaled 210.74 million shares.

The Nasdaq composite index for the over-the-counter market slipped 0.67 to 379.03. The American Stock Exchange's market value index closed at 303.76, off 0.16.