A record 400 organizations vied for rankings through submissions to Stonewall's Workplace Equality Index this year, the benchmark used to rank employers in its annual survey, where they're ranked on their employment policies, career development opportunities, training and community engagement.
A Stonewall representative told CNBC that MI5 pulled ahead in the rankings thanks in part to having a senior member of staff that champions LGBT equality on its executive board.
"In six years it (MI5) has moved from outside the Top 100 to number one, and this is because of the ongoing commitment it has made to empowering its LGBT staff and supporting them in being themselves," the representative said.
MI5's Director-General Andrew Parker, meanwhile, explained that it was essential to bring a wide variety of people into the security service, which is responsible for tackling national security threats including cyber attacks, terrorism and espionage.
"Diversity is vital for MI5, not just because it's right that we represent the communities we serve, but because we rely on the skills of the most talented people whoever they are, and wherever they may be," Parker said in a press release.
Here is a list of the top 10 LGBT-friendly organizations as ranked by Stonewall in 2016: