Hundreds of thousands of fingerprint, DNA and arrest history records were accidentally wiped from police databases because of “human error” and “defective code”, according to the policing minister.

Kit Malthouse said the blunder happened during routine maintenance of the Police National Computer (PNC) earlier this week, causing huge swathes of information on suspects released without further action to be lost.

Officers are working “at pace” to recover the data and the incident is not thought to have put public safety at risk, according to an initial assessment.

Initially some 150,000 records were said to have been lost, but it has emerged the number is far higher than first thought at around 400,000.

Speaking to reporters on Friday, Home Office minister Mr Malthouse said the PNC was a large database of information that requires maintenance, adding: “Unfortunately down to human error, some defective code was introduced as part of that routine maintenance earlier this week and that’s resulted in a deletion of some records and that’s currently under investigation.

“We have already put a stop to the problem so it can’t reoccur.

“And we are now working very quickly with policing partners and within the Home Office to try and recover the data and assess the full extent of the problem.”

Although admitting officials are “not entirely sure as yet” whether the problem has had an operational impact on the police, Mr Malthouse said contingency plans have been put in place to ensure investigations can continue.

Asked if he could guarantee that future cases are not being jeopardised and no victims will be denied justice as a result, Mr Malthouse replied: “Well, obviously the police have a number of evidential routes that they can use in cases and part of that does rely on the Police National Computer.

“Our job now over the next few days is to recover the data which was erroneously deleted and to make sure what remains on the computer is sound and can be used by police officers.

“And what we’ve said to those who are currently relying on PNC data for investigations is that once we’ve done that, they can re-run their searches and hopefully get the result that they need.”

A National Police Chiefs’ Council (NPCC) spokesperson said: “We are aware of an issue with the Police National Computer (PNC) and are working closely with Government to understand the potential operational impacts and resolve them at pace.”

It is understood that the PNC, which is run by the Home Office, is operating and police officers are using it in the normal way.

The 400,000 figure is a best estimate, with technical analysis continuing, but it will not be that number of separate records, as one record could be of multiple arrests and one arrest could involve multiple offences.

A former police chief warned the “very large” deletion from the PNC risks officers failing to identify suspects who have been released but go on to offend.

Former Cumbria Police chief Stuart Hyde told BBC Radio 4’s Today programme the loss represents a “very large proportion” of the around 650,000 people arrested each year and is a “risk to public safety and a risk to the safeguarding of vulnerable people across the country”.

Meanwhile, Labour called for Home Secretary Priti Patel to take responsibility for the “extraordinarily serious security breach” that “presents huge dangers for public safety”.

The Times, which first reported the data loss, said crucial intelligence about suspects had vanished because of the blunder, and Britain’s visa system was thrown into disarray, with the processing of applications being suspended for two days.

According to a letter to police chiefs later leaked to the newspaper, 213,000 offence records, 175,000 arrest records and 15,000 person records have potentially been deleted in error from the system.

Naveed Malik, who leads the National Police Chiefs’ Council work on the PNC, is said to have told police chief constables and police and crime commissioners around 26,000 DNA records relating to 21,710 people had potentially been deleted in error, alongside a further 30,000 fingerprint records and 600 subject records.

The letter reportedly says the deleted DNA records included some that had “previously been marked for indefinite retention following conviction of serious offences”.

It added: “We are aware of a couple of instances of ‘near misses’ for serious crimes where a biometric match to an offender was not generated as expected but the offender was identified through matches between scenes. However, in these circumstances, without a direct match report to the subject, it may be more challenging for police to progress to an interview or arrest.”

The Home Office refused to comment further on the matter while the investigation into what happened was continuing.