Former Conservative ministers have "serious questions to answer" over a data breach which revealed the details of thousands of Afghans who had supported British forces, Sir Keir Starmer has said.
The prime minister said the failings inherited by his government included a super-injunction which blocked reporting of the breach, and a "secret route" for those affected to come to the UK "that has already cost hundreds of millions of pounds".
Details of nearly 19,000 Afghans who had applied to move to the UK after the Taliban seized power were mistakenly leaked in February 2022 by a British official.
The previous government learned of this in August 2023 when details were posted on Facebook.
Sir Ben Wallace, who was defence secretary at the time, said the Conservative government had applied for a four-month injunction after it became aware of the breach, which a judge converted to a super-injunction, meaning even the existence of the court order could not be reported.
The super-injunction was lifted on Tuesday, following a review.
Sir Ben has said he makes "no apology" for applying for the initial injunction, insisting this was "not a cover-up" but designed to protect Afghans who could be at risk.
Speaking at the start of Prime Minister's Questions in the Commons, Sir Keir said: "There's always been support across this House for the United Kingdom fulfilling our obligations to Afghans who served alongside British forces.
"We warned in opposition about Conservative management of this policy and yesterday, the defence secretary set out the full extent of the failings that we inherited: a major data breach, a superinjunction, a secret route that has already cost hundreds of millions of pounds.
"Ministers who served under the party opposite have serious questions to answer about how this was ever allowed to happen."
An emergency resettlement scheme for those affected by the breach, the Afghanistan Response Route, was set up in April 2024 and has seen 4,500 Afghans so far arrive in the UK.
It has cost £400m, with a projected final cost of about £850m. A total of 6,900 people are expected to come to the UK under this scheme, which has now closed.
The Ministry of Defence (MoD) believes 600 Afghan soldiers included in the leak, and 1,800 of their family members, are still in Afghanistan.
The existence of the scheme was only made public after the super-injunction was lifted by the High Court.
Explaining the decision, Mr Justice Chamberlain said the MoD's internal review found the Taliban "likely already possess the key information in the dataset" and confirmation of its existence was unlikely to "substantially" raise the risk faced by those impacted.
Speaker Sir Lindsay Hoyle told the House of Commons the super-injunction raised "significant constitutional issues".
As MPs were unaware of the breach, it could not be raised in the Commons or examined by a parliamentary committee.
BBC News understands that ministers decided last autumn that they needed to look at whether to lift the super-injunction.
The super-injunction had been lifted by a judge in May 2024, the day before Rishi Sunak called the general election, but the then-Conservative government successfully appealed that decision.
Labour ministers are also facing questions over why the super-injunction was kept in place.
Downing Street defended the government's decision to apply for the super-injunction to be extended, saying "there was significant work that needed to be done" to assess the situation.
A review looking at the possibility of lifting the super-injunction formally began in January.
In other developments:
Downing Street has not said whether the official responsible for the leak has faced disciplinary action but they are no longer in the same role.
Both Defence Secretary John Healey and Conservative leader Kemi Badenoch have apologised on behalf of their parties for the breach.
The leak, which came after the withdrawal of US and UK troops from Afghanistan in 2021, involved the names of people who had applied to come to the UK under the Afghan Relocations and Assistance Policy (Arap) scheme.
The scheme was open to Afghans who worked with the UK government, as well as their family members, and feared reprisals from the Taliban.
4 PerFlyer