Has Britain reached a post-homophobic state of grace? Or do the better angels of our nature just come out at election time? (A rarely stated thesis). While barely disguised homophobia continues to blight our schools, streets and screens, electoral politics seems to have reached a point where being a gay or straight barely registers on the hustings.

The last parliament was defined by the fight for marriage equality and its aftermath – especially David Cameron’s uneasy relationship on the issue with the rest of the Conservative party. Afterwards, there was a fear of backlash: a fear that Tory voters would punish the party for being too socially liberal, and Tory big-wigs would back away from installing candidates who were outside of the traditional mainstream. But these fears proved to be unfounded in 2015.

A quick analysis of last Thursday’s general election suggests that if there were votes withheld for candidates because they happened to be LGBT, they were more than made up for with votes won because the candidate was LGBT. In some places, being an out gay man or woman seems to have actually helped the candidate's personal vote. But the impression I gained from being on the doorsteps with LGBT candidates, from multiple parties and in both urban and suburban constituencies, was that, if it mattered at all, the candidates’ sexual orientation was of little consequence to the average voter. Crispin Blunt couldn’t recall a single person bringing the issue up in Reigate, while Simon Hughes was mobbed by adoring BME voters unfazed by long forgotten tabloid headlines. The only reported homophobia was the claim that Labour canvassers in Finchley and Golders Green had been telling Orthodox Jewish voters that the incumbent Tory MP, Mike Freer, was gay. The race was tight, and Ashcroft's polls had just put the parties neck and neck. But on the day, Freer increased his vote by 4,000 and enjoyed as comfortable a majority as in 2010.

The Conservatives put up more openly gay candidates than any other party: 39 men and three women. Of their 13 out MPs at dissolution, 12 stood for re-election and only one lost (Eric Ollerenshaw in Lancaster and Fleetwood) but his loss was made up for by the election of Ben Howlett in Bath. Howlett overcame a huge Liberal Democrat majority and was one of the sparkling Tory victories of the evening. A quick analysis of the 50 races where there were competitive LGBT candidates shows that Tory LGBT candidates performed considerably better than their straight colleagues. 72 per cent of them had larger vote share increases than the national trend, and on average their gains were three times the Tory average.

Note: this map was produced before the final three SNP MPs were declared.

Labour did not take many seats from the Tories but of the 10 they did win, three were won by LGB candidates. Wes Streeting and Peter Kyle generated two of the biggest swings to Labour in Ilford North and Hove respectively, and Cat Smith’s victory in Lancaster and Fleetwood was one of the five head-to-heads where both major parties ran out LGB candidates. The nine incumbent Labour lesbian and gay MPs held on comfortably, and the party stood Gerald Jones in the safe seat of Merthyr Tydfil. In fact, Wales and Scotland are now the UK areas with the highest proportions of out gay MPs. The seven Scots and three Welsh were predominantly returned from working class constituencies struggling with life after mining and industrial decline.

Meanwhile, all four gay and bisexual Liberal Democrat MPs were ousted: David Laws (Yeovil), Simon Hughes (Bermondsey), Stephen Williams (Bristol West) and Stephen Gilbert (St. Austell and Newquay) - but they were swept away on a tide which had nothing to do with their work as constituency MPs. All of them polled better than they probably should have had any right to do.

The SNP sent shock waves through British politics last Thursday and on that wave rode in seven new LGB identifying MPs. They exemplify the demographic diversity that is LGBTQ Britain: ranging from the high profile Edinburgh QC Joanna Cherry to the 20 year old Glasgow University politics student Mhairi Black. Their parliamentary party is now 12.5 per cent LGBT, which means that the SNP have the highest proportion of LGBT MPs anywhere in the world.

The 32 newly elected British MPs who identify as lesbian, gay or bisexual have set a new world record. They represent 4.9 per cent of the House, not far off the proportion of Brits estimated to be LGBT (between 5 and 7 per cent) The total far exceeds the levels of representation in countries where gay rights have been entrenched for decades: for example, there are currently twelve out MPs in the Swedish Riksdagen and ten in the Dutch Tweede Kamer. Thirteen of the new House of Commons members are Labour MPs, twelve are Conservatives and six SNP MPs (although those numbers are likely to rise as newly elected MPs feel comfortable enough to come out to the world beyond their immediate circle of family and friends).

Remarkably there were 155 out LGBT candidates in May 2015 wearing the colours of all parties and in all parts of the country – 42 Tories, 39 Lib Dems, 36 Labour, 21 Greens, seven UKIP, seven SNP, three Plaid Cymru and one from the Alliance party of Northern Ireland. Every region of the UK had LGBT candidates and they were no more concentrated in urban areas than rural. Northern Ireland was, unsurprisingly, not a happy hunting ground for gay politicians with only one unsuccessful candidate, but more surprising the East of England was almost as unwelcoming with only two no-hoper candidates.

While the record number of LGB MPs is a win for diversity, internally the club is not as diverse as one might hope. There were only two lesbians in the last parliament, and while the number of women has tripled in 2015 they are still out-numbered by 26 men. All the LGB MPs in the last House of Commons were white, all in this House are white, and a full 153 of the 155 candidates were white. There were four out transgender candidates in the elections: he much heralded Emily Brothers for Labour in Sutton and Cheam who increased the Labour vote by over 4 per cent, Zoe O’Connell the Liberal Democrat in Maldon whose vote actually declined less than the national average, and Greens, Stella Gardiner (Bexleyheath) and Charlie Kiss (Islington South), who both increased their party share of the vote. Kiss, the only trans man in the election, actually increased the Green vote by 6 per cent which was twice the national average.

Maps compiled by Kieran Healy.

Professor Andrew Reynolds is director at the LGBT Representation and Rights Research Initiative at the University of North Carolina, Chapel Hill.