The threat of a hostile raid on Union Carbide Corp. grew yesterday as GAF Corp. disclosed it had boosted its stake in the firm to 9.9 percent and intends to ask federal antitrust officials for approval to raise its holdings to at least 15 percent.

The disclosure came amid further troubles for the embattled chemical company on other fronts. Carbide confirmed it had replaced the head of its agricultural division that was responsible for the poison gas disaster at Bhopal, India, and more recent leaks at its plant in Institute, W.Va.

At the same time, Moody's Investors Service said it was reviewing Carbide's long-term debt for possible downgrading in light of the massive restructuring announced by the firm earlier in the week and the increasing threat of a takeover attempt.

"There's an awful lot of possibilities that exist in a situation such as this . . . that could affect bondholders," said W. Bruce Jones, assistant vice president of Moody's.

GAF, a Wayne, N.J., chemical firm controlled by real estate magnate Samuel J. Heyman, said in a filing with the Securities and Exchange Commission that it had purchased about 1.9 million shares of Carbide stock Monday, Tuesday and Wednesday, at prices ranging form $53.625 a share to $55.75. The prospect of further buying helped push Carbide stock up 50 cents yesterday, and it closed at $57.25.

The new GAF buying spree increased the company's stake in Carbide from the 7.1 percent level it announced earlier in the week. GAF also said it was notifying the Federal Trade Commission and the Justice Department of its plan to raise its interest to 15 percent. But a GAF spokesman declined to comment when asked if the company planned any buying beyond the 15 percent figure.

In an earlier filing with the agency, GAF had said it was buying Union Carbide stock because it was "an attractive investment opportunity" and that, in doing so, GAF had considered "the possibility of a business combination between GAF and Union Carbide."

Moody's specifically cited the possibility "of a takeover of the company" as well as the "risk of material financial liability" from the Bhopal litigation as factors that prompted it to review Carbide's current A-3 long-term-debt rating. Jones noted that companies fending off takeovers frequently have defended themselves by issuing more debt and buying back their stock, thereby reducing the assets of the company.

"The main objective of management is self-preservation," Jones said. "If a company issues a great deal more debt that increases the interest costs that have to be paid . . . in no way is that beneficial to bondholders."

But Jones stressed that the main factor was Carbide's announcement of a massive restructuring this week that will result in the layoff of 4,000 white-collar workers, the sale of $500 million worth of assets and the shutdown of some of its petrochemical and other plants. Carbide also said it will shift $500 million in surplus pension funds back to the corporation and buy back 10 million shares, or about 13 percent of its common stock.

While this move was generally applauded by investment analysts, Jones noted that the buyback of stock also shrinks the assets of the company, leaving it more exposed to potentially large liabilities such as might result from the Bhopal lawsuits.

A downgrading of Carbide's bond rating would tend to drive up Carbide's costs of borrowing in the future.