The UK armed forces have come second in a league table of the most LGBT friendly militaries in the world – but the US has been ranked at 40th.

Research published by the Hague Centre for Strategic Studies ranked 103 armies based on their inclusion of LGBT recruits. The index was rated in order of how the forces adhered to around 20 policies and practices.

New Zealand was ranked top with the UK and the Netherlands joint second. Sweden came third. Australia, Canada and Denmark were ranked in fourth, fifth and sixth place. Belgium and Israel at eighth and ninth, followed by France.

America’s low position at 40 is blamed on the country’s ban against transgender troops. While gay, lesbian and bisexual troops can serve openly, thanks to the 2011 repeal of Don’t Ask Don’t Tell (DADT), transgender troops are still left with no clear guidelines and can be discharged if their gender identity is discovered.

The US ban on transgender service members contrasts starkly with other countries. New Zealand, the most progressive nation in the world according to the league table, allows transgender people to serve openly, as do the Netherlands and the UK.

The Hague Centre for Strategic Studies conducted the research at the request of the Dutch Ministry of Defence as a way of marking the 40th anniversary of the Netherlands becoming the first military in the world to allow LGBT individuals to serve openly in the armed forces.

UK Defence Minister Anna Soubry said: “This is more good news and reward for the hard work the department has made to create a positive working environment for its lesbian, gay and bisexual military and civilian employees. It builds on the excellent result in this year’s Stonewall Index.

“The single services want to create a workforce, both regular and reserve, that is drawn from the breadth of the society we defend, that gains strength from that society’s range of knowledge, experience and talent, and that welcomes, respects and values the unique contribution of every individual.”