Intelligence agencies will only be allowed to collect data secretly from suspects' computer hard drives if there is evidence that "legally protected interests," like human lives or state property, are in danger, the Constitutional Court in Karlsruhe announced.

Law enforcement authorities must get permission from a judge before they secretly upload spyware to a suspect's computer via e-mail, the court said. Furthermore, personal data may not be collected or evaluated in an investigation.

Wednesday's decision voided a broadly formulated law in the western German state of North Rhine-Westphalia, which had explicitly allowed the use of Trojan software since January 2007. The law did not adequately uphold the basic rights of those under investigation, the judges concluded in their 106-page report.

New rights for Internet age

Can computer surveillance help fight terrorism?

The ruling came after former state Interior Minister Gerhart Baum, two lawyers and a journalist had protested against the state law. However, head judge Hans-Juergen Papier emphasized that the case had wider implications. It effectively leaves the door open to federal authorities, who had halted all online searches until the state ruling came, to spy on computers in a limited manner.

With the decision to restrict online investigations, the Constitutional Court had for the first time established the "basic right to the protection of confidentiality and integrity in information systems," said Papier.

Police online investigations have been hotly disputed in Germany since Interior Minister Wolfgang Schaeuble called for computer searches in response to a foiled Islamic terrorist attack planned on a German train in 2006. A handful of online searches have been conducted in Germany since 2005.

Crime versus privacy

Proponents, including Schaeuble and Chancellor Angela Merkel, have defended police spyware as a useful tool to fight terrorism. According to the Interior Ministry, evidence is growing that Islamist militants use the Internet to recruit and train potential terrorists.

"In order to be able to protect citizens, the security authorities have to keep up with the technological developments of the offenders by using modern IT technology and professionally encoded communication," said Schaeuble on Wednesday in response to the ruling.

Spyware opponents say that the method is a violation of individual privacy rights.

"Secret access to the entire hard drive is a new kind of attack on basic rights -- even more far-reaching than a massive bugging operation," said Gerhart Baum previously, as reported by German public broadcaster ARD's online news site.

Data protection is a particularly sensitive topic in Germany, where both the Nazi Gestapo and the East German Stasi implemented invasive surveillance methods.