Websites such as eBay may be liable for trademark infringements if they play an "active role" in promoting fake goods, the European Court of Justice has said.
The court's ruling came in response to a case brought by French cosmetics giant L'Oreal against eBay in the UK.
L'Oreal claims eBay is liable for sales on its website of counterfeit goods and "parallel imports" - L'Oreal products not intended for sale in the EU.
EBay said the court gave "some clarity" while others saw it as a "blow".
L'Oreal said it was "satisfied" with the ruling.
"This decision is in line with the position L'Oreal has taken for several years and is applicable in courts throughout the European Union," a company spokesman said.
In May 2009, the High Court in the UK ruled that eBay was not jointly liable for the sale of any counterfeit L'Oreal products through its website, but said that the online marketplace could do more to stop trademark infringement.
The High Court asked the European Court of Justice (ECJ) to clarify the obligations of internet marketplaces under EU law.
In a statement, the ECJ said that it was for national courts to order online shopping sites to take measures to prevent trademark infringements.
But it also said that companies such as eBay were deemed to play an "active role" for instance by "optimising the presentation of the online offers for sale or promoting those offers".
"When the operator has played an 'active role' of that kind, it cannot rely on the exemption from liability which EU law confers, under certain conditions, on online service providers such as operators of internet marketplaces," the court said.
'Level playing field'
Stefan Krawczyk, senior director at eBay Europe, said: "The judgement provides some clarity on certain issues, and ensures that all brands can be traded online in Europe.
"As a marketplace, eBay provides a level playing field for all online sellers and will continue building constructive partnerships to expand the range of brands being sold on eBay."
Kirsten Gilbert, partner at Marks & Clerk Solicitors, which specialises in intellectual property, said the verdict was a blow to eBay.
"Brands have been concerned for years now that the internet has facilitated the trade of counterfeit goods," she said.
"Items which would otherwise be available only from back-street traders have become instantly available to consumers in the privacy of their own homes.
"L'Oreal and other brand owners will be hoping that online marketplaces like eBay now sit up and pay attention to the sales of counterfeit items which go through their sites."