Sir Keir Starmer accused Tory ministers of failures over the data leak which led to a secret route for thousands of Afghans to come to the UK to avoid being targeted by the Taliban.
The Prime Minister accused the previous Conservative government of “failings” including a “major data breach, a super injunction, and a secret route which has already cost hundreds of millions of pounds”.
Speaking at Prime Minister’s Questions, he added: “Ministers who served under the party opposite have serious questions to answer about how this was ever allowed to happen.”
Former Defence Secretary Sir Ben Wallace has defended the scheme which was set up after a data leak by an official at the Ministry of Defence.
The secret route may have saved the lives of thousands of Afghans, with a Taliban commander claiming it got hold of the list shortly after it was leaked.
Sir Ben said he makes "no apology" for applying for the initial injunction and insisted it was "not a cover-up" but was motivated by the need to protect people in Afghanistan, with links to the UK, whose safety was at risk.
Earlier, Defence Secretary John Healey said thousands of Afghans who have arrived in the UK on a secret route after the MoD data leak were security checked but some will “no doubt” go on to commit offences
He rejected a claim by Reform UK leader Nigel Farage that known sex offenders had been allowed to come to Britain under the scheme, which was covered by a super injunction, and aimed to protect people from being killed, tortured or targeted by the Taliban.
“If he has got hard evidence of individuals that pose a risk he needs to report that information to the police,” the Cabinet minister told Times Radio.
“Like the last Government, this Government over the last year, in bringing anyone into this country under any of the Afghanistan schemes that we inherited, we run careful security checks..and where they pose those sorts of threats they are prevented from coming and denied access to Britain.”

Pressed whether all the Afghans arriving had been thoroughly checked for links to the Taliban, terror groups, or for violent or sexual assaults, Mr Healey responded: “Yes.”
Grilled further if any of the Afghans had committed offences since they came to the UK, he said: “I can’t account for individuals here.
“No doubt some of them have committed some offences and got into trouble.
“That’s true right across the board,” he added, seemingly referring to crime rates in the general population.
A total of around 6,900 people are expected to be relocated from Afghanistan by the end of the secret scheme, with 900 of 1,500 “principal” individuals already in the UK with their families, with invitations having been sent to 600 more “principals.”
The scheme is understood to have cost around £400 million so far, with a projected final cost of about £850 million.
Thousands of Afghans who worked alongside the British Army in the wartorn country are eligible to come to the UK under a different scheme, with claims that the total bill for the schemes will hit £7 billion.
The “secret route” was set up after a dataset containing the personal information of nearly 19,000 people who applied for the Afghan Relocations and Assistance Policy (Arap) was released “in error” in February 2022 by a defence official.
The Ministry of Defence only became aware of the breach when excerpts from the dataset were posted anonymously on a Facebook group in August 2023, and a superinjunction was granted at the High Court in an attempt to prevent the Taliban finding out about the leak.
It is understood that the unnamed official emailed the data outside a secure government system while attempting to verify information, believing the dataset to only have around 150 rows.
However, more than 33,000 rows of information were inadvertently sent.
Mr Healey, who on Tuesday revealed details of the scheme, denied he had earlier misled Parliament to keep it secret.
He did not deny that the Government had been told that ten per cent, around 700, of the Afghans could end up homeless in the UK.

The scheme was condemned by Mr Farage who said: “The numbers are off the charts, the cost is beyond comprehension and the threat to women walking the streets of this country is incalculable.”
The Defence Secretary said most of those benefiting from the “secret route” did not work with British forces so could not come to the UK under the different scheme, and would not be able to claim asylum here.
Former Defence Secretary Sir Ben Wallace has defended the scheme and said he does not believe thousands of people with “little or tenuous links to the UK” were relocated to the country as claimed by former veterans’ minister Johnny Mercer.