IMAGE DISTRIBUTED FOR LEGO SYSTEMS - Collectible LEGO BrickHeadz are unveiled at the North American International Toy Fair, Saturday, Feb. 18, 2017, in New York. (Photo by Diane Bondareff/AP Images for LEGO Systems)

HONG KONG (AP) — Danish toy maker Lego says it has won a major legal victory in China, where a court ruled in its favor in a copyright case against companies making knockoffs of its famous colored bricks.

The company said Thursday that it was the first time it has won an unfair competition case against imitators in China.

It said the Shantou Intermediate People’s Court ruled that two Chinese companies selling Bela brand blocks similar to the Lego Friends line infringed a copyright and ordered them to stop.

The court issued its ruling in September but the decision didn’t take effect until November.

Earlier this year, a Beijing court ruled that Lego’s name and logo are well-known trademarks in China, giving the company stronger legal footing for pursuing copyright cases.