NEW YORK, SEPT. 9 -- The stock market struggled to a small gain today, at least temporarily braking its late-summer slide.

The Dow Jones average of 30 industrials, which had fallen 177.30 points over the nine previous sessions, rose 4.15 to 2549.27.

Volume on the New York Stock Exchange came to 164.91 million shares, down from 242.80 million in the previous session.

Stocks began to attract support from buyers late in Tuesday's session after the Dow Jones industrial average briefly dropped below 2500.

Analysts said that raised hopes that the market was close to completing a correction, or temporary pullback, from the record highs it reached last month.

But the bulls got sparse help today from the bond market, where interest rates were mixed after pushing higher early in the session to the point where yields on the longest maturities of Treasury bonds reached about 9.7 percent.

A slumping dollar and rising interest rates have been cited as the primary forces behind the stock market's recent decline.

Wall Streeters were looking ahead uneasily to Friday's scheduled report on the nation's trade balance for July. A bigger-than-expected trade deficit for June caught many investors off guard a few weeks ago.

The Merrill Lynch Market Letter estimates that the figures will show imports exceeding exports in July by about $15 billion, compared with a $15.7 billion June deficit.

Among actively traded blue chips, General Electric rose 1/2 to 60; American Telephone & Telegraph added 1/4 to 32 1/4; International Business Machines dropped 1/2 to 157 1/4, and Eastman Kodak lost 1/2 to 98 3/8.

Ames Department Stores led the active list, down 3 3/8 at 18 1/2 on turnover of more than 3.8 million shares. Late Tuesday the company reported sharply lower quarterly earnings.

Tokheim, which said sales of a new line of fuel dispensers were running below expectations, fell 3 1/8 to 27. Pannill Knitting jumped 3 1/4 to 16 1/8. The company said it retained an investment banking firm to study the possibility of being sold.

Metals stocks were a notable strong spot. Reynolds Metals climbed 3 5/8 to 49 3/4; Phelps Dodge 2 1/4 to 48; Asarco 1 1/8 to 30 3/4; Alcoa 7/8 to 58 1/4, and Alcan Aluminum 3/4 to 32.

Bolar Pharmaceutical, traded on the American Stock Exchange, rose 2 5/8 to 51. The company said it expects its earnings this year increase by $1 a share from sales of its new generic version of a SmithKline antihypertensive drug.

Advancing issues slightly outnumbered declines on the NYSE. The exchange's composite index edged up 0.20 to 175.79.

Standard & Poor's index of 400 industrials rose 0.42 to 366.72, and S&P's 500-stock composite index was up 0.36 at 313.92.

The Nasdaq composite index for the over-the-counter market gained 1.59 to 439.19. At the American Stock Exchange, the market value index closed at 347.55, up 0.42