In toyland, everyone can win.

Both Lego Group and Tyco Toys Inc. were claiming victory yesterday over a recent federal judge's ruling on the ability of Tyco to make and sell blocks that closely resemble Lego's famous plastic building bricks.

Under the ruling issued last week, Tyco can continue to make Lego look-a-likes without changing a plastic molecule. However, U.S. Federal Judge Garrett E. Brown Jr. in the U.S. District Court in New Jersey ordere Tyco to stop advertising its "Super Blocks" as just like Lego's, only cheaper.

What's more, Brown told Tyco that it could not continue to use the Lego trademark on its packages -- to show that the two products are interchangeable -- without including a statement that Tyco is not associated with Lego.

"We're delighted with the outcome," said Allan Zellnick, the attorney for Lego, which issued the first victory statement early yesterday. "We believe Tyco has gotten the sales because it has been fooling the public into believing the blocks are the same and cheaper. In fact, only six of the Tyco blocks are identical to Lego's; the rest are totally different," Zellnick said. "If Tyco is forced to market its blocks honestly and truthfully, we believe we'll beat the pants off them."

However, hours later, Tyco President Richard Grey called the ruling "simply good news. The fact of the matter is we will be able to continue to make blocks exactly the same without having to change one bit... . I don't consider that a victory for Lego."

Stock in the publicly held Tyco, was off 37.5 cents yesterday, closing at $12.75 a share.

The battle between the toymakers reflects the profitability of the Lego market. Tyco, which began making Lego look-a-likes in 1984, sold more than $21.3 million of its Super Blocks last year -- accounting for nearly a fourth of its total business.

Lego, a 54-year-old family-owned business based in Denmark, declined to release its precise sales figures. But Zellnick said the company's sales in the United States are more than $100 million a year.

To hold onto its business, Lego has been aggressively fighting imitators. In addition to the New Jersey court suit, Lego has also sued Tyco in Hong Kong, winning a ruling that bars Tyco from manufacturing or selling bricks there copied from designs made after 1973. Tyco has appealed that ruling.

Meanwhile, in April Lego won a preliminary injunction barring Tyco from marketing bricks in Austria. Similar lawsuits involving Tyco are under way in Italy and Canada.

"The Lego Group resorts to litgations... . because our legal rights are infringed by imitators who step over the line of what is legally permissible {and} because imitators do not make authentic copies of Lego products. They only pretend to have done so in order to fool the public into believing their cheaper imitations are the same as the real thing," said V. Holck Andersen, president of Lego Systems Inc., the U.S. division of Lego Group.

The victory claims by both sides in the New Jersey court case are "a function of whether you believe the glass is half empty or half full," said David Leibowitz, a financial analyst with American Securities Corp.

"Lego clearly prevailed in the courts on the points that were issued, but Tyco need not discontinue manufacturing its product line," Leibowitz said. "Thus, the court ruling is no way a knock-out punch for Tyco."

However, he added, "when you get down to it, Lego will probably be able to enhance its place in the market by having a strong competitor out there. A second player legitimizes the market, brings new ideas and adds to the competition. So both could do well."