Britain's foreign spy agency MI6 flew a rainbow flag outside its London headquarters to mark the International Day Against Homophobia, Transphobia and Biphobia on Tuesday, and to woo potential applicants from the gay community.
Britain's spy agencies historically saw gay spies as a security risk, considering them much more vulnerable to blackmail, but dropped a hiring ban just over 25 years ago.
In January the domestic intelligence agency MI5 was named the country's most gay-friendly employer by rights group Stonewall.
The flag was hoisted outside the Secret Intelligence Service's building overlooking the River Thames, well-known for its appearance in James Bond movies.
Alex Younger, the chief of MI6 known as "C", has previously said that MI6 wanted to create "a workforce of individuals as unique as the challenges we face".
"We recognize that the more diverse the contribution, the better the solution and the greater the impact of our work," he was quoted as saying on the agency's website.
In April, the Government Communications Headquarters (GCHQ) eavesdropping agency apologised for its ban on gays which led to the dismissal and subsequent suicide of one of its most brilliant code breakers, Alan Turing, in the 1950s