LONDON — MI5 has been named as the UK's best employer for lesbian, gay and bisexual staff.

The security agency outperformed 400 organisations participating in LGBT rights charity Stonewall's annual survey of the country's most inclusive employers.

60,000 people took part in 2016's Workplace Equality Index survey — the highest number in its 12-year history.

Entrants submitted evidence demonstrating their organisation's performance against a set of best practice criteria, which assessed employers' attitudes towards workplace diversity, culture and inclusion, a Stonewall spokesperson told Mashable. The criteria spanned ten areas of employment policy and practice, including training, staff engagement, line management and network groups.

Questions asked in the survey also addressed whether lesbian, gay and bisexual people felt comfortable disclosing their sexual orientation at work, and whether there were visible LGBT role models in the organisation.

In addition to MI5, Stonewall named Lloyds Banking Group, National Assembly for Wales, social housing provider B3Living and law firm Pinsent Masons in its top five list.

"Much of MI5’s work keeping the country safe goes on by necessity out of view, so I’m delighted we can be publicly recognised as such an inclusive and welcoming place to work," MI5 director general Andrew Parker said in an official statement.

"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," he continued.

Last year, Nottinghamshire Healthcare NHS Trust was the most gay-friendly employer in the UK.