The right of journalists to protect their sources will be strengthened throughout Europe, after a judgment from the European Court of Human Rights today.

In a ruling strongly reaffirming the "vital importance" protection of sources plays to press freedom, the court overturned a ruling that had compelled Dutch journalists to reveal the names of participants in illegal car races.

The journalists, who were investigating the races for Dutch magazine Autoweek in a story compared by some to the film The Fast and the Furious, took photographs of those involved in the race, but edited them to guarantee their anonymity.

Police investigating the incidents then demanded photos held by journalists revealing their identities.

"This is a case where people were breaking the law holding illegal street races, but the police officers following the cars didn't bother to jot down registration numbers, relying instead on journalists instead in order to bring people to book," said media lawyer Mark Stephens, who organised an intervention of media and press freedom groups in the case.

"The court's ruling shows that where you have incompetent or lazy policing, journalists are not going to be there to fill the vacuum."

The case, brought by Samoma Uitgevers, the Dutch company which publishes Autoweek, had caused widespread concern after an earlier judgment from the court appeared to scale back previous guarantees of journalists' protection of sources.

The right for journalists to protect sources was initially established in a case brought in the UK against a trainee journalist with The Engineer magazine, Bill Goodwin, who successfully fought an order to reveal confidential information about a source who had given him details of a company's financial status.

Experts say today's judgment goes further, strengthening the law on source protecting and ensuring it is implemented uniformly across Europe.

"This ruling was an acid test for the court and for media freedom across Europe," said Geoffrey Robertson QC, barrister for the intervening media organisations. "It sets a high benchmark for protection of journalistic materials and will force police and prosecutors across Europe, from Russia to France, to change their practices."

The intervening media organisations included Index on Censorship, the Committee to Protect Journalists, Article 19 and MediaGuardian.co.uk publisher Guardian News & Media.