BERLIN (AP) -- Germany's high court on Wednesday upheld the legality of an anti-terrorist database that tracks thousands of people, but ordered changes in how it is operated and who is included.
Germany's top security official, Interior Minister Hans-Peter Friedrich, told reporters after the verdict that the new guidance from the court would also affect how authorities run a database on far-right extremists.
Both databases were created to help investigators keep better track of suspects by consolidating data collected by some 60 police and intelligence services.
The anti-terrorism database, established in 2007, now contains information on some 17,000 people; the database on the far right was established in 2012. Both contain basic details on suspects like names, birthdates and addresses, as well as information on telephone numbers used, bank details and religion.
Of the individuals now listed in the anti-terrorism database, authorities say 84 percent are associated with radical Islamic organizations.
Opponents had challenged the database's legality, arguing controls on how authorities use it are not tight enough and questioning what qualified a suspect to be included.
Though the Federal Constitutional Court in Karlsruhe ruled that the database does not violate any rights guaranteed by the constitution, it ordered the government to make some changes by the end of 2014.
To ensure legal "transparency and control," the court said Parliament should receive regular reports on the database.
It also restricted who can be listed in the database, saying, for example, that individuals who simply support -- perhaps unwittingly -- an organization that supports terrorism cannot be included.
Friedrich said the details of the ruling would be examined by experts and that the changes would be made without diminishing the effectiveness of the database.
Overall, Friedrich said, he was happy with the ruling.
"The court determined, in particular because of the high importance of the fight against terrorism, that it is important for the agencies to work together and this anti-terrorism database is an important basis for this cooperation," he said.
Germans are sensitive to privacy issues and concerns about excessive retention of data by authorities, a stance that stems from historical experiences of widespread snooping by the state under the Nazis and later in the former East Germany.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.