Online writers alleged to have published leaked Apple trade secrets should have the same right to protect their sources as offline reporters, a judge in California has ruled, in a case that may have wide-ranging implications for online journalism in Silicon Valley.

The computer company first went to court in 2004 after Jason O'Grady, publisher of Apple news site PowerPage, along with Kasper Jade of AppleInsider and Monish Bhatia of Think Secret, ran stories about an as-yet-unreleased music gadget, details of which were supplied by unnamed sources believed to be Apple employees.

Seeking to identify the individuals, the company originally won the right to subpoena communication traffic from Mr O'Grady's email provider and said its secrets had been stolen. But an appeals court on Friday overturned that ruling, saying Mr O'Grady is able to protect his sources' confidentiality under California's reporter's shield law and rejecting Apple's assertion that the publishers were not journalists.

"We decline the implicit invitation to embroil ourselves in questions of what constitutes 'legitimate journalism'," judge James Kleinberg said. "The shield law is intended to protect the gathering and dissemination of news, and that is what petitioners did here.

"[But] we can think of no workable test or principle that would distinguish 'legitimate' from 'illegitimate' news. Apple [did not] supply any colourable ground for declaring petitioners' activities not to be legitimate newsgathering and dissemination."

Kurt Opsahl, an attorney with the Electronic Frontier Foundation (EFF), which fought the case, said: "Today's decision is a victory for the rights of journalists, whether online or offline, and for the public at large. The court has upheld the strong protections for the free flow of information to the press, and from the press to the public."

Fellow EFF attorney Kevin Bankston said it was "a free speech victory for every citizen reporter who uses the internet to distribute news". A consortium of bloggers had previously asked the case to ensure all bloggers be given the same rights as news reporters, but Judge Kleinberg instead stuck to the letter of the law.

California's shield law, enacted in 1935 and also present in 30 other US states, grants the ability to withold sources' names to a "publisher, editor, reporter or other person connected with or employed upon a newspaper, magazine, or other periodical publication".

The judge said that, whilst new digital media publishers were not explicitly referred to in the statute, they were covered just as much as television and radio broadcasters. Mr O'Grady has written for several printed Mac news magazines, has maintained PowerPage for 11 years and now blogs for ZDNet.

"The opinion issued by the court is a good one and very thoughtful," Mr O'Grady said. "It's clear that the court understands that allowing this case to go through would have set a dangerous precedent for all journalists."

Free daily newsletter

If you like our news and feature articles, you can sign up to receive our free daily (Mon-Fri) email newsletter (mobile friendly).