Nearly 80 countries still have a total prohibition on same-sex relations. Over half of them are members of the Commonwealth. Their homophobic laws were imposed by Britain in the 19th century, during the era of colonialism, and retained after independence. The penalties for homosexuality include 25 years jail in Trinidad and Tobago and 20 years plus flogging in Malaysia. Several Commonwealth countries stipulate life imprisonment: Sierra Leone, Tanzania, Pakistan, Uganda, Bangladesh and Guyana.

There have also been new laws enacted in some countries, most excessively in Nigeria, which has outlawed LGBTI organisations, fundraising and public advocacy – and even gay-focused HIV prevention, and LGBT-themed books and movies. Lesser repression involves restrictions on media coverage of LGBTI issues and the foreign funding of LGBTI groups, as happens in Uganda.

In these backlash countries, LGBTI people are increasingly demonised by politicians to win popular support

In these backlash countries, LGBTI people are increasingly demonised and scapegoated by demagogic politicians and fundamentalist clerics as a cheap way to win popular support. At the start of 2016, a spokesperson for Malawi’s opposition party, Ken Msonda, sought to bolster his profile and reputation saying: “Arresting them [LGBT people] won’t address this problem because sooner or later they are being released on bail. The best way to deal with this problem is to kill them!”

Anglican churches in Nigeria and Uganda have contributed to the witch-hunting atmosphere; supporting draconian new anti-gay laws. To the delight of many governments, having an “enemy within” has conveniently distracted public attention from economic failings and corruption.

Hate rhetoric is fuelling homophobic mob violence – sometimes perpetrated by right-wing death squads – especially in Honduras, Brazil, Mexico, Peru and El Salvador. Six Honduran LGBTI activists have been assassinated since last summer.

A disproportionately high number of victims of anti-LGBTI violence are trans people. The Trans Murder Monitoring Project reports that over 1,300 trans and gender-diverse women and men were murdered in Latin America from 2008-14.

In recent years, the Indian and Singaporean courts have upheld the criminalisation of same-sex relations (that decision in India was recently referred back to the supreme court), and Burundi has outlawed homosexuality for the first time it its history. In Syria, Isis is targeting LGBTI people for execution, mostly by being thrown off tall buildings and in neighbouring Iraq, Shia militias are also waging a terror campaign against LGBTI people.

Despite backlash, the trend is towards greater equality

Despite this bleak picture, in the overwhelming majority of the world’s 193 countries, the trend is towards ever greater LGBTI acceptance and equality.

In recent years, we’ve seen the decriminalisation of gay sex in Palau, São Tomé and Príncipe, northern Cyprus and Mozambique. The Seychelles has pledged to repeal its anti-gay laws, though it has not yet done so.

A Ugandan court annulled the notorious anti-homosexuality act, albeit on a technicality. The new bill to replace it has never been legislated. Vietnam lifted the ban on same-sex marriage in 2015, as a prelude to its expected eventual legalisation.

The Botswana courts have recognised the right of an LGBTI organisation to be registered and the Indian supreme court has upheld the rights of the trans community. Helem, Lebanon’s LGBTI group, has operated for over a decade; hosting the first LGBTI centre in the Arab world. Taiwan has just elected its first women president, a supporter of same-sex marriage, in a country where marriage equality has more than two-thirds public support.

The first openly lesbian cabinet minister has taken office in South Africa and two men who were prosecuted for being gay in Zambia were acquitted at their trial.

Both the UN’s human rights council and the African Commission on Human and People’s Rights passed resolutions in 2014 calling on all countries to protect their LGBTI communities from discrimination and violence.

Research by the Williams Institute has found rising global acceptance of same-sex relations, including in developing countries: “Latin America acceptance of homosexuality ranges from a high of 34% in Uruguay to a low of 2% in Ecuador. On the legal recognition for marriages for same-sex couples, Uruguay has the highest level of support at 57% while Guatemala has the lowest level of support at 12%. In Africa, acceptance of homosexuality ranges from a high of 38% in South Africa to a low of 2% in Ghana.” These figures are still quite low but nonetheless a big improvement on a decade ago.

In this context of majority progress, backlash is a minority blip in the overall worldwide trajectory towards LGBTI equality. It is a reaction to the positive gains won by brave, determined LGBTI human right defenders, many of whom risk their liberty and lives. If we were not winning there would be no need for backlash. Take it as a backhanded compliment. LGBTI freedom has been long delayed but it cannot be denied.

Peter Tatchell is a human rights campaigner.

From 8-14 February the Guardian Global Development Professionals Network is highlighting the work of the LGBT rights activists throughout the world. Follow the conversation at #LGBTChange.

Join our community of development professionals and humanitarians. Follow @GuardianGDP on Twitter.