NEW YORK, DEC. 23 -- The stock market gained ground today as a firmer dollar and futures-related buying programs propelled the Dow Jones industrial average to its first close above the 2000-point level in almost two months.

The Dow advanced 27.19 points to close at 2005.64. The blue-chip index last closed above 2000 on Nov. 2.

Advances led declines 5 to 2 on the New York Stock Exchange. Big Board volume totaled 203.1 million shares, up from 192.6 million shares Tuesday.

Chester Pado, director of technical analysis with Jefferies & Co. in Los Angeles, attributed the market's strength to the announcement late Tuesday by the Group of Seven industrial nations that its members would renew cooperative efforts to halt the dollar's decline.

"The G-7 pronouncement that the dollar has fallen far enough and they are looking to stabilize it ... was really responsible," Pado said. "The bond market was solid all day long, and that rubbed off on the {stock} market."

Pado said the close above 2000 could remove "a small psychological barrier." He said the strong advance-decline ratio also was a bullish sign. "In theory, we should be under some pressure from tax-loss selling, but we're not," Pado said.

Traders and analysts said computer-driven buying programs pushed the market up early in the session.

"We saw some buy programs at the end of the session {Tuesday} that helped narrow the losses, and that was followed by some pretty frenzied buying this morning," said John Burnett, head trader at Donaldson, Lufkin & Jenrette Inc.

On the trading floor, Phillips Petroleum Co. stock jumped 1 7/8 a share to close at 12 7/8 in heavy trading on takeover rumors. Pennzoil Co. denied speculation that it was buying shares in Phillips, which one analyst termed the hottest potential takeover stock of 1988.

Volume in NYSE-listed issues, including trades in stocks on regional exchanges and in the over-the-counter market, totaled 240.74 million shares, compared with 214.64 million Tuesday.

Prices were higher in heavy trading on the American Stock Exchange. The American Stock Exchange market value index rose 3.47 to 260.44. Volume totaled 15.26 million shares, compared with 14.26 million Tuesday.

The National Association of Securities Dealers index of over-the-counter stocks gained 4.18 to close at 331.48.