The breach occurred in February 2022 after someone working in UK Special Forces (UKSF) headquarters accidentally emailed the personal data of every applicant to the UK’s Afghan resettlement scheme to date – nearly 19,000 people – to someone outside government.

The data was sent to an Afghan person living in the UK, who passed the information onto others, including people in Afghanistan. One individual in Afghanistan, after having his application rejected, posted some of the data on Facebook.

Alerting a defence minister to the presence of the data on Facebook in August 2023, an MoD case worker helping people seeking relocation called the possibility the Taliban might get hold of it “bone-chilling”.

The data came from the Afghan Relocations and Assistance Policy (Arap) resettlement scheme, set up in 2021 as the Taliban seized control of Afghanistan.

It was highly sensitive because Afghan nationals who worked with the British government during the conflict with the Taliban were at risk of serious harm and even execution with the group back in power.

The breach led to the previous government setting up a secret £850m emergency resettlement scheme to bring some of those in the database to the UK.

Both the breach and subsequent scheme were kept secret by an unprecedented super-injunction, until it was lifted by High Court judge Mr Justice Chamberlain on Tuesday.

The emergency scheme – known as the Afghanistan Response Route and set up in April 2024 – has resulted in about 4,500 Afghans being brought to the UK so far, with a further 2,400 expected.

The government announced this week the scheme was being closed down, but said relocation offers already made to those who remain in Afghanistan would be honoured.