A Belgian court on Monday gave Facebook 48 hours to stop tracking Internet users who do not have accounts with the US social media giant, or risk fines of up to 250,000 euros ($269,000) a day.
The order follows a case lodged by Belgium's privacy watchdog in June which said Facebook indiscriminately tracks Internet users when they visit pages on the site or click "like" or "share", even if they are not members, the court said.
Facebook said it would appeal against the decision.
"Today the judge... ordered the social network Facebook to stop tracking and registering Internet usage by people who surf the Internet in Belgium, in the 48 hours which follow this statement," the court said.
"If Facebook ignores this order it must pay a fine of 250,000 euros a day to the Belgian Privacy Commission."
The Belgian court decision is the latest legal setback for Facebook in Europe.
Last month the EU's top court ruled, on the basis of a complaint against Facebook, that the EU-US "Safe Harbour" deal allowing firms to transfer Europeans' personal information to the United States was "invalid" because it did not properly protect the data from spy agencies.
In Monday's decision, the Belgian court said Facebook uses a special "cookie" that lodges on an Internet user's device if they visit a Facebook page, for example belonging to a friend, a shop or a political party -- even if they are not signed up to the network.
The cookie then stays on their device for up to two years and allows Facebook to consult it whenever the user pays further visits to Facebook pages, or to any page where they can like or recommend via a Facebook link.
"The judge ruled that this is personal data, which Facebook can only use if the Internet user expressly gives their consent, as Belgian privacy law dictates," the statement said.
Facebook said the cookie -- which it calls the datr cookie -- was safe.
"We've used the datr cookie for more than five years to keep Facebook secure for 1.5 billion people around the world," a spokesman said in a statement emailed to AFP.
"We will appeal this decision and are working to minimize any disruption to people's access to Facebook in Belgium."