LUXEMBOURG — EBay may be held liable for trademark breaches on its auction site if it has knowledge of the infringing data, the European Union’s highest court said Tuesday in a dispute involving the cosmetics maker L’Oréal.

The Court of Justice here ruled that, as an operator of an online platform, eBay is liable if it “played an active role” that would “give it knowledge of or control over the data relating to the offers for sale.”

L’Oréal has argued that eBay, the world’s largest online marketplace, is liable for trademark breaches because of its active involvement in the pre-sale, sale and after-sale processes.

The court was called in at the request of Britain, which sought guidance in 2009 after a local tribunal found eBay was not liable for trademark breaches by users. A French court ordered the two companies into mediation in 2009 after saying that eBay’s efforts to block sales of counterfeits showed its good faith, and in 2008 a Belgian case rejected similar claims by L’Oréal, the world’s largest cosmetics company.

“The judgment provides some clarity on certain issues, and ensures that all brands can be traded online in Europe,” said Stefan Krawczyk, eBay’s European government relations director. “A lot of cases will still have to be assessed by the national courts. We’ve moved on — we fulfill most of these conditions now anyways.”

EBay, based in San Jose, California, had hoped the ruling would provide enough legal guidance to help settle pending trademark disputes between it and L’Oréal, he said. The court ruled last year, in a dispute between Google Inc. and LVMH Moët Hennessy Louis Vuitton, that Internet hosts may benefit from an exemption under the Union’s e-commerce law only if their role in processing potentially infringing data is neutral.

Laurence Balmayer, a spokeswoman for L’Oréal in Paris, said the company would study the ruling before commenting.

The case dates back to 2007 when L’Oréal sent a letter expressing its concerns about the “widespread” sale of fake products on eBay’s European Web sites and asking it to address those concerns. L’Oréal sued, saying eBay had not done enough.

Trademark-protected words eBay bought to bring visitors using search engines to its site via sponsored links were a point of contention raised by L’Oréal, which is based in Paris. While L’Oréal said the practice helped guide people faster to fake products, eBay and the British government argued it was meant as an eBay advertisement.