The Foreign Office has apologised for its historic ban on employing gay diplomats.
Its most senior civil servant said the “misguided” approach had deprived the UK of some of its “brightest and best talent”.
The ban on LGBT staff was lifted in July 1991 and 30 years on, Sir Philip Barton, the head of the Diplomatic Service, has issued a public apology.
The restriction was imposed because of the fear that LGBT staff could be more vulnerable to blackmail because of their sexuality, 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 and blackmailed into passing secrets to the KGB – he was 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.”