After decades of paranoia about homosexuals in its ranks, MI5 has for the first time made it into the top 10 of the UK’s most gay-friendly employers.

The domestic intelligence agency was ranked seventh in the lesbian, gay and bisexual charity Stonewall’s 2015 list of top 100 employers – up from 25th place last year.

MI5’s success came alongside improvements in all three branches of Britain’s Armed Forces. For the first time the Army, Navy and RAF all made it into the top 100 of lesbian, gay and bisexual-friendly employers.

The milestone comes on the 15th anniversary of the lifting of the ban on gay people being allowed to join the military.

Stonewall spokesman Richard Lane said: “It represents incredibly significant progress in a very short time. I wouldn’t say I am entirely surprised by it though, because the Armed Forces have been working very hard to change the culture of their organisations. They have realised the importance of recruiting the best people for the job, regardless of their sexual orientation.”

Lonely Planet's top 10 gay-friendly travel destinations Show all 10 1 /10 Lonely Planet's top 10 gay-friendly travel destinations Lonely Planet's top 10 gay-friendly travel destinations 1. Copenhagen, Denmark Lonely Planet's top 10 gay-friendly travel destinations 2. New Zealand Lonely Planet's top 10 gay-friendly travel destinations 3. Toronto, Canada Hubert Kang Lonely Planet's top 10 gay-friendly travel destinations 4. Palm Springs, US Lonely Planet's top 10 gay-friendly travel destinations 5. Sitges, Spain Getty Lonely Planet's top 10 gay-friendly travel destinations 6. Berlin, Germany Lonely Planet's top 10 gay-friendly travel destinations 7. Mykonos, Greece Mykonos This little Aegean island became famous in the 1960s for the tolerance and vibrant nightlife it offered to gay men and women. Despite competition from party islands such as Ibiza, it still attracts hordes of gay tourists who enjoy the queer camaraderie of its clubs and beaches. The island is named after Mykons, the grandson of Apollo, and the nearby island of Delos, birthplace of Apollo and Artemis, is one of its main attractions. Homosexuality was legalised in Greece in 1951 and male prostitution became legal in 2006. But the fact that the roots of homosexual history are usually traced back to ancient Greece is surely part of what draws gay people to Mykonos. Lonely Planet's top 10 gay-friendly travel destinations 8. New York City, US Nikada/Getty Images Lonely Planet's top 10 gay-friendly travel destinations 9. Reykjavik, Iceland Lonely Planet's top 10 gay-friendly travel destinations 10. Montevideo, Uruguay

About 400 organisations, employing over 13 million people, applied to get on Stonewall’s list. The success of the Army, which was placed 46th, the Navy, which came 56th and the RAF, in 91st position, was hailed by the Defence Secretary Michael Fallon, who said: “I’m tremendously proud of this ringing endorsement. Our Armed Forces have worked tirelessly over the past 15 years to become more inclusive employers.” MI5’s ranking, beating the likes of Brighton Council and the Co-op, suggests a huge change from the Cold War era when gay “spooks” were considered a blackmail risk, with paranoia stoked by the spies Guy Burgess and Anthony Blunt, who happened to be homosexual as well as communist.

MI5’s ban on gay people endured until the early Nineties, but in 2008 it hired Stonewall to help it attract lesbian and gay recruits.

Andrew Parker, the Director General of MI5, said: “Keeping the country safe requires the best efforts of the richest mix of the most talented people. It is essential that MI5 is an inclusive workplace.”

Mr Lane also suggested that gay people had the potential to make excellent secret service agents. He said: “Most people don’t decide they are gay on Tuesday and come out on Wednesday, which means – unfortunately – that many gay people have experience of hiding their true personality and not talking about it, which might fit some of MI5’s requirements.”

The Top 10

1 Nottinghamshire Healthcare NHS Trust

2 Tower Hamlets Homes

3 Lloyds Banking Group

4 National Assembly for Wales

5 St Mungo’s Broadway

6 Baker & Mckenzie

7 MI5

8 Crown Office & Procurator Fiscal Service

9 = Freshfields Bruckhaus Deringer