Stocks closed higher Friday in heavy trading after fighting off separate declines tied to two Iraqi missile attacks, one on Israel and the other on Saudi Arabia.

The Dow Jones industrial average, which jumped 24.01 Thursday, rose another 16.34 to close at 2659.41.Among broader market gauges, the New York Stock Exchange composite index rose 0.74 to 183.38 and the Standard & Poor's 500-stock index added 1.29 to 336.07. The price of an average share gained 13 cents.

Advances led declines 963-551 among the 1,977 issues crossing the NYSE tape. Big Board volume totaled 194,350,000 shares, compared with the 223,150,000 traded Thursday.

The market showed its resilience Friday by closing higher after twice suffering setbacks sparked by new Iraqi missile attacks.

Iraq fired seven Scud-B missiles into Israel Friday, leaving one person dead and 40 injured as the U.S. Patriot defense system deflected but did not destroy the Iraqi projectiles, officials said.

Two Scuds were also fired at Riyadh, Saudi Arabia, one apparently leveling a six-story office building. Witnesses reported at least one casualty.

The Dow had been up about 10 points, lost that gain on news of the attack on Israel, rebounded and extended its gain to 20 points before giving that gain up after word of the attack on Riyadh. But the blue chips bounced back again in late trading to close higher.

"I think the prospect of lower rates has really helped us over the last couple of days," said Ron Doran, director of institutional trading at C.L. King & Associates in Albany, N.Y.

"Large amounts of cash accumulated in December and January and have not really been put to work. The prospect of lower rates is getting money managers to put funds into the market."

Doran also said the market was helped by a report that domestic economic growth, while down in the fourth quarter, was not off as much as expected.

The Commerce Department reported Friday morning gross national product fell 2.1 percent in the fourth quarter, the first drop in almost five years and the largest drop since the 1982 recession. But many economists had expected a decline of as much as 3.1 percent.

"GNP was better than expectations, and the hope is the decline will push the (Federal Reserve) to get rates down and stimulate the economy," said Doran.

On the trading floor, Citicorp was the most active issue, up 1/4 to 133/4.

American Express followed, up 3/8 to 203/8. The company blamed restructuring costs at its Shearson Lehman Brothers brokerage for a fourth-quarter earnings plunge reported late Thursday.

Chase Manhattan was third, up 1/2 to 125/8.

Among the blue chips, General Electric rose 13/8 to 597/8, AT&T added 3/8 to 311/4, IBM gained 15 to 1225/8 and Philip Morris added 3/8 to 547/8.

Volume of NYSE-listed issues, including trades in stocks on regional exchanges and in the over-the-counter market, totaled 231,991,560 shares, compared with 262,479,090 shares traded Tuesday.

Prices gained in active trading on the American Stock Exchange.

The Amex Market Value index rose 1.85 to 308.55. Advances led declines 330-194 among the 765 issues traded. The price of an average share gained 6 cents. Composite volume totaled 16,209,130 shares vs. 16, 652,600 traded Thursday.

Presidio Oil led the Amex issues, unchanged at 43/4.

The National Association of Securities Dealers composite index rose 2.95 to 394.28.