The European Union's top court fined Spain 15 million euros on Thursday for failing to adopt EU rules protecting personal data during police investigations.
The country must also pay an extra 89,000 euros for each day that the infringement continued, the court said.
The EU adopted rules in 2016 aimed at protecting individuals' personal data when it is processed by police and criminal justice authorities. Spain missed the May 2018 deadline to transpose the EU rules into national law, prompting the European Commission to take legal action.
The court said Spain had failed to fulfil its obligations, and ordered the government to pay a lump sum of 15 million euros, plus a daily fine of 89,000 euros for each day after the judgment which Spain continues to flout the rules.
"By today's judgement, the Court declares that Spain has failed to fulfil its obligations," the court said.
The ruling did not involve any specific case of data privacy violations.
The Spanish Justice Ministry had no immediate comment.
The case is the first where the court has imposed a lump sum payment and daily penalties at the same time - an order that reflects "the seriousness and duration of the infringement," the court said.
Spain said it would transpose the rules by March 2020, citing delays caused because the country was awaiting the formation of a new government. As of May 2020, Spain had still not adopted the EU rules.