Thousands of DNA samples from innocent people are currently retained
Two British men should not have had their DNA and fingerprints retained by police, the European Court of Human Rights has ruled.
The men's information was held by South Yorkshire Police, although neither was convicted of any offence.
The judgement could have major implications on how DNA records are stored in the UK's national database.
The judges said keeping the information "could not be regarded as necessary in a democratic society".
Home Secretary Jacqui Smith said she was "disappointed" by the European Court of Human Rights' decision.
The database may now have to be scaled back following the unanimous judgement by 17 senior judges from across Europe.
Under present laws, the DNA profiles of everyone arrested for a recordable offence in England, Wales and Northern Ireland are kept on the database, regardless of whether they are charged or convicted.
The details of about 4.5m people are held and one in five of them does not have a current criminal record.
Both men were awarded £36,400 (42,000 Euros) in costs, less the money already paid in legal aid.
The court found that the police's actions were in violation of Article 8 - the right to respect for private and family life - of the European Convention on Human Rights.
It also said it was "struck by the blanket and indiscriminate nature of the power of retention in England and Wales".
The judges ruled the retention of the men's DNA "failed to strike a fair balance between the competing public and private interests," and that the UK government "had overstepped any acceptable margin of appreciation in this regard".
The court also ruled "the retention in question constituted a disproportionate interference with the applicants' right to respect for private life and could not be regarded as necessary in a democratic society".
The home secretary said: "DNA and fingerprinting is vital to the fight against crime, providing the police with more than 3,500 matches a month.
"The government mounted a robust defence before the court and I strongly believe DNA and fingerprints play an invaluable role in fighting crime and bringing people to justice.
"The existing law will remain in place while we carefully consider the judgement."
Solicitor Peter Mahy, who represented the men, said that the decision will have far-reaching implications.
"It will be very interesting to see how the UK government respond.
"The government should now start destroying the DNA records of those people who are currently on the DNA database and who are innocent of any crime."
Human rights group Liberty said it welcomed the court's decision.
Director Shami Chakrabarti said: "This is one of the most strongly worded judgements that Liberty has ever seen from the Court of Human Rights.
"That court has used human rights principles and common sense to deliver the privacy protection of innocent people that the British government has shamefully failed to deliver."
'Invasion of privacy'
Phil Booth, of the NO2ID group, which campaigns against identity cards, said: "'This is a victory for liberty and privacy.
"Though these judgements are always complicated and slow in coming, it is a vindication of what privacy campaigners have said all along.
"The principle that we need to follow is simple - when charges are dropped suspect samples are destroyed. No charge, no DNA."
The Nuffield Council on Bioethics reports on the ethical questions raised by recent advances in biological and medical research.
Its director, Hugh Whittall, said: "We agree wholeheartedly with this ruling. The DNA of innocent people should not be kept by police.
"People feel it is an invasion of their privacy, and there is no evidence that removing from the DNA database people who have not been charged or convicted will lead to serious crimes going undetected.
"The government now has an obligation to bring its own policies into line."
Rights breach claim
One of the men who sought the ruling in Strasbourg, Michael Marper, 45, was arrested in 2001.
He was charged with harassing his partner but the case was later dropped. He had no previous convictions.
The other man - a teenager identified as "S" - was arrested and charged with attempted robbery but later acquitted.
In both cases the police refused to destroy fingerprints and DNA samples taken when the men were taken in to custody.
The men went to the European Court of Human Rights after their cases were thrown out by the House of Lords.
They argued that retaining their DNA profiles is discriminatory and breaches their right to a private life.
The government claims the DNA profile from people who are not convicted may sometimes be linked to later offences, so storing the details on the database is a proportionate response to tackling crime.
Scotland already destroys DNA samples taken during criminal investigations from people who are not charged or who are later acquitted of alleged offences.
The Home Office has already set up a "contingency planning group" to look into the potential implications arising from a ruling in favour of the men.