A federal judge yesterday upheld the legality of a controversial defensive maneuver by SCM Corp., which is trying to avoid a takeover by Britain's Hanson Trust PLC.

The ruling by U.S. District Judge Shirley Wohl Kram in New York permits SCM to sell its chemical-pigment and Durkee foods businesses to a group of investors that includes SCM's top management.

Hanson argued that if SCM's plan were approved, the investor group, led by Merrill Lynch & Co., would be getting the two valuable business units for a bargain price, stripping SCM of so much value that its takeover bid would have to be abandoned.

Hanson lawyer Dennis J. Block said the decision will be appealed, and other attorneys in the case said the sale of the two units is likely to be delayed during the appeal.

The court decision is the latest round in a bidding war that began in August, when Hanson offered $60 a share, or a total of $7.35 billion, for the stock of SCM, a diversified manufacturer whose products include Smith-Corona typewriters as well as its pigment and food lines. Hanson Trust has interests in building materials, construction equipment, shoes and textiles.

SCM's board rejected the offer as insufficient and hired the investment firm Goldman, Sachs & Co. to seek a competing bid. That led to the offer from Merrill Lynch and SCM management to buy SCM for $74 a share through a combination of cash and high-risk securities known as junk bonds. Hanson's top offer is $75 a share in cash.

The SCM directors also granted the Merrill Lynch group an option to buy the food and pigment businesses for $430 million if a hostile suitor acquired more than one-third of SCM's stock. Hanson argued that the two businesses are worth up to $700 million.

SCM's tactic is known as a "lock-up option," designed to cement a sale to a friendly bidder while fending off an unwanted one.

Kram ruled that SCM's board of directors had acted legally in approving the option. Her decision was based on the "business judgment" rule, which gives considerable leeway to directors to act in the best interests of the company.

But she criticized board members, saying they "did not give extensive consideration" to the value of the Merrill Lynch offer. SCM accepted the word of Goldman Sachs that the price for the two units was fair, "without ever inquiring about the range of fair values," Kram said.

"The foregoing is not condoned by this court," Kram said, but she added that courts should not second-guess directors' decisions on such issues unless there is a strong showing that the directors violated their obligations to the company and its shareholders. There was no such showing, she said.

Kram also ruled that Hanson had passed the threshhold that activates the lock-up option by purchasing more than one-third of SCM's stock in the open market. Hanson had argued unsuccessfully that its stake in SCM had not passed the one-third threshhold, if stock options and other stock rights were taken into account along with SCM's common stock.