DNA profiles of thousands of suspected sex offenders are being destroyed because of a legal loophole that leaves police powerless to hold them.

From October, forces in England and Wales will no longer be able to hold indefinitely genetic information on people arrested on suspicion of sexual and violent crimes once they have been released without charge.

Police will be given the right to apply for data to be held for longer, but this appeal process is not yet in place, the BBC said. Despite the lack of appeal, the Home Office has ordered forces to delete DNA records ahead of the change, Labour says, including the details of 18,000 people arrested but not charged with rape.

Labour claims forces are now following government directives to delete records in advance of the change to the law, according to the BBC.

The changes to the national DNA database come in the 2012 Protection of Freedoms Act, under which DNA profiles from people arrested but not charged with a serious offence such as rape should be destroyed.

Police can apply to the biometrics commissioner to hold a sample for three years, with an extension of two years, if they have the grounds to do so. But this opportunity to appeal is not yet in place, despite Prime Minister David Cameron telling the Commons in 2011 that safeguards had been introduced, The Times said.

Shadow home secretary Yvette Cooper said the loophole amounted to "shocking incompetence" by the Home Office. She told The Times: "It is appalling that DNA evidence from thousands of rape suspects is now being destroyed, contrary to the promises made by the Prime Minister and the Home Secretary.

"They were warned repeatedly in Parliament and by the police about the risks involved in destroying DNA evidence in this way. Theresa May's failure to prevent and deal with this incompetence shows she has not taken seriously enough the risks to rape convictions and crime from her policy."

Ms Cooper demanded an urgent inquiry into "how this implementation went so badly wrong", saying: "We need to know if the police have been ignored or overruled by the Home Office and why this has gone so wrong."

A Home Office spokeswoman said: "We are taking samples from the guilty and getting rid of them when people have done nothing wrong. Through the Protection of Freedoms Act we are restoring common sense to the system by ensuring only those convicted of a criminal offence will have their DNA retained indefinitely... And all DNA samples taken by police are checked against the national database before deletion."