Stocks pushed higher after Federal Reserve Chairman Alan Greenspan indicated that only a modest increase in interest rates may be needed to keep inflation well tamed.

The Dow Jones industrial average closed 56.68 points higher at 10,841.63, building on a nearly 190-point climb Wednesday after consumer prices showed little sign of inflation.

Broader stock indexes also advanced. Shrugging off early disappointing news from Compaq Computer, the technology-dominated Nasdaq composite index gained 26.32, to 2544.15. On Wednesday, the index rose 103.16 -- its largest one-day point gain.

The Standard & Poor's 500 index rose 9.49 today, to 1339.90.

In his most direct recent comments on interest rates, Greenspan told Congress that while inflation remains in check, the Fed should consider taking preemptive action to avert any threat to continued economic growth.

To the markets' relief, the Fed chairman said a modest increase now could eliminate the need for more severe moves at a later date. The Fed's Open Market Committee, which sets the central bank's interest rate policy, meets June 29-30.

The Fed has warned recently that it might raise interest rates to guard against a surge in inflation. The annual rate of inflation felt by consumers so far this year is 2.6 percent, compared with 1.6 percent for all of 1998.

After early jittery fluctuations, financial markets advanced most of the day in a continuing response to Wednesday's Labor Department report on consumer prices and on sheer relief that Greenspan had showed the Fed's hand so clearly.

"The markets were relieved that the Fed is finally going to do something but it won't be too drastic," said Eugene G. Mintz, financial markets analyst at Brown Brothers Harriman. Greenspan also didn't issue any dire warnings about the stock market, as he has done in the past, Mintz added.

Greenspan said that while it is unclear that the stock market's current high prices represent a speculative "bubble," an end to Wall Street's long ride needn't have catastrophic consequences for the economy.

Other news today underscored the country's economic growth. The Labor Department reported the number of Americans filing new claims for unemployment benefits fell by 28,000 last week, to 297,000.

The nation's trade deficit, meanwhile, held steady at a record high of $18.9 billion in April, matching the March figure.

Compaq shares initially stumbled, affecting other technology stocks, after the computer maker predicted it would lose up to 15 cents a share in the second quarter, compared with the 20-cent profit expected by Wall Street analysts. The company also announced a restructuring. But Compaq went on to recover, closing up 3/8 at 22 5/8.

Other technology stocks were mixed. Dell Computer rose 11/16, to 36 1/2, but IBM fell 1/2, to 120-3/16.

Among Internet stocks, At Home rose 3-15/16, to 51-5/16, and eBay fell 2, to 146 3/4.

Advancing issues outnumbered declining ones by 3 to 2 on the New York Stock Exchange, where 700.3 million shares were traded, down from 806.9 million Wednesday.

The NYSE composite index rose 3.90, to 636.07; the American Stock Exchange composite index rose 3.77, to 768.69; and the Russell 2000 index of smaller companies rose 2.18, to 443.38.