The Foreign Office has apologised for a “misguided” historic ban on employing LGBT staff, which was lifted in July 1991.
The restriction deprived the UK of some of its “brightest and best talent,” its senior civil servant Sir Philip Barton said as he issued a public apology 30 years after the ban was lifted.
The restrictions were imposed because of fears LGBT staff's sexuality could make them a target for blackmail, potentially posing a security risk.
That fear was fuelled by spy scandals such as the case of John Vassall, a clerk at the British Embassy in Moscow, who was caught in a gay honey trap sprung by the Soviets.
He was blackmailed into passing secrets to the KGB and jailed for 18 years in 1962.
In his message to staff, Sir Philip said it was a “misguided view” to believe that LGBT people were more susceptible to blackmail than straight counterparts.
“The ban was in place because there was a perception that LGBT people were more susceptible than their straight counterparts to blackmail and, therefore, that they posed a security risk,” Sir Philip said.
“Because of this misguided view, people’s careers were ended, cut short, or stopped before they could even begin.
“And the diplomatic service undoubtedly deprived itself of some of the UK’s brightest and best talent.
“I want to apologise publicly for the ban and the impact it had on our LGBT staff and their loved ones, both here in the UK and abroad.”
Foreign Secretary Dominic Raab said: “I am grateful to the UK’s LGBT diplomats, past and present, who so brilliantly represent our country and promote our values around the world.
“As co-chair of the Equal Rights Coalition, we are working with 41 partner countries to tackle discriminatory laws and prejudice globally.
“The UK champions LGBT rights because we believe freedom and tolerance are a source of strength in communities at home and abroad.”
Eloise Stonborough, Associate Director of Policy and Research at Stonewall said: "Today’s apology from the Foreign Office for their historic ban on employing lesbian, gay, bi, trans and queer employees is a welcome step towards acknowledging the injustices of the past.
"This discriminatory ban, lifted 30 years ago today, meant that countless LGBTQ+ people were denied a job, or lived in fear of being outed. Today’s apology will mean a lot to many LGBTQ+ people, and we hope that the Foreign Office continues to support their LGBTQ+ staff, champion LGBTQ+ equality and fight for a world where LGBTQ+ people are free to thrive as themselves, wherever they are."