Huawei emerged victorious in its patent infringement lawsuit against Samsung.

As part of the ruling, Samsung is ordered to halt manufacturing and sales of the offending devices.

The companies have been in patent lawsuits with each other since 2016.

Samsung‘s legal battles against Apple might have been memorable, but one lawsuit the South Korean manufacturer wishes it could forget is the patent infringement lawsuit it just lost against Chinese manufacturer Huawei.

Back in 2016, Huawei filed several patent infringement lawsuits in the US and China and alleged that Samsung used its cellular technology and software patents without licenses. Even though it was believed that Huawei wanted compensation for Samsung’s alleged unlicensed use, the BBC reported that Huawei instead wanted an agreement to use Samsung’s technology.

It was the first time a Chinese company filed a lawsuit against Samsung, a somewhat unusual scenario seeing how Chinese companies are usually the ones being sued.

Unfortunately for Samsung, it was not in the right side of history, since a Chinese court recently ruled in favor of Huawei. Phys.org reports that the Shenzhen judge ruled in Huawei’s favor over two patents that involve fourth-generation phone technology.

According to the report, the judge sided with Huawei after finding that Samsung “maliciously delayed negotiations” that started back in 2011.

As part of the ruling, the judge ordered Samsung to halt the manufacturing and sales of devices using the aforementioned technology and to pay a small court fee. A list of phone models was not provided, though Samsung said it would “thoroughly review the court’s decision and determine appropriate responses.”

We doubt this will be the end of this tit-for-tat. After Huawei filed its patent infringement lawsuits against Samsung, the South Korean company countersued the Chinese outfit with a patent infringement lawsuit of its own.

Samsung alleged that Huawei infringed on some of its 4G-related patents, and Huawei responded by filing lawsuits against Samsung in two more Chinese cities. Last April, Huawei emerged victorious when the Quanzhou Immediate People’s Court sided with the company and ordered Samsung to cough up $11.6 million in damages.

As such, we expect Samsung to put up some sort of appeal, though the story is still developing.