Amid a mass of colour and pounding Latin rhythms, revellers at this year’s Bogotá Pride march waved banners stating “not one step back”. They were among tens of thousands who took to the streets to celebrate and support Colombia’s LGBT community.

Many annual Pride marches that were once solemn protests against repression have become celebrations of now-existing rights or progress, reflecting the strength of LGBT communities.

In Bogotá, for example, the capital of a macho and socially conservative country, there has been surprising progress in LGBT rights.

In March, Angélica Lozano Correa, a former member of the Bogotá city council, became the first openly LGBT person to be elected to the country’s Senate. In 2016 the country’s government passed laws allowing same-sex couples to adopt and marry, and the previous year it granted transgender people the right to change their identity on official government documents – policies which have allowed more equality and openness.

But while these laws and political representation might suggest Bogotá is “friendly” and tolerant of the LGBT community, the issue is not clear-cut. This year’s Bogotá Pride march was marked by an undertone of resistance to and fear of the right-wing government of the new president, Ivan Duque.

Duque openly opposes the LGBT-inclusive peace agreement his predecessor, Juan Manuel Santos, signed with leftist rebels Farc in 2016. Activists claim he is also against same-sex marriage and adoption rights.

“Although the government promised there would be no setbacks to LGBT rights, the appointment of several anti-LGBT officials, cuts in resources for public policies and the continued strengthening of radical religious movements that promote hate speech and misinformation against the LGBT population are worrying,” says Marcela Sánchez, director of Colombia Diversa, a leading LGBT rights organisation.

A man decorates his facade with clothes of the rainbow flag in Spain during the week of Pride celebrations. Photograph: Marcos del Mazo/LightRocket via Getty Images

Rough measures

Indeed, determining a city’s attitude towards the LGBT community is complex. Studies that try to do this often look at political or legal metrics such as freedom to marry, or laws protecting against discrimination.

Equaldex, a collaborative knowledge base for the global LGBT movement that maps the legality of homosexuality, identifies a number of factors including freedom to change gender and to adopt – although it hasn’t ranked countries or cities in order of best to worst.

An index from the Human Rights Campaign looks at municipal services, law enforcement and the city leadership’s public position on equality across the US.

Seventy-eight out of 506 US cities had a “perfect score” of 100, for reasons such as introducing trans-inclusive health benefits to city employees, as in Brookings, South Dakota. Birmingham, Alabama, obtained a full score for passing comprehensive nondiscrimination ordinances, along with other cities such as Cleveland in Ohio, a state that had previously prohibited same-sex marriage and civil unions.

However, the Human Rights Campaign clearly states its index does not and cannot reflect a city’s friendliness.

Other global surveys have tried to assess friendliness by covering public attitudes, access to nightlife and personal safety. A 2017 survey by the housing website Nestpick ranked the best LGBT cities by asking thousands of people how friendly they felt their city was based on safety and nightlife. Madrid, Amsterdam and Toronto came out as the top three.

San Francisco has the biggest proportion of LGBT residents in the US. Photograph: Brigitte MERLE/Getty Images/Photononstop RF

“Modern strongholds for LGBTQI culture remain in western Europe and Canada,” says Merryn Johns, editor and chief for Curve, a lesbian-focused magazine in New York.

Arguably the size of the LGBT population in urban areas could reflect the level of friendliness, as “many LGBTI folk head to cities from rural areas because of the promise of a freer, more tolerant life there,” says André du Plessis, executive director of the International Lesbian, Gay, Bisexual, Trans and Intersex Association.

A study of US metro areas found San Francisco has the biggest proportion of LGBT residents in the country at 6.2%, followed by Portland and Austin. San Francisco has often been called the “gay capital of the world” for its culture of tolerance and vibrant scene.

But even when cities seem progressive on the surface, the lived experience of members of the LGBT community can tell a dramatically different story.

“For a certain social strata [sic], Cape Town and Johannesburg are gay meccas, but at the same time black lesbians living in poor areas there are dealing with violence and targeted rape,” says Graeme Reid, director of the LGBT rights programme at Human Rights Watch.

A study in 2017 found that four in 10 LGBT South Africans know of someone who has been killed for “being or suspected of being” LGBT. Black members of this community are twice as likely (49%) as white people (26%) to know of an LGBT person who has been murdered.

Even in London and Paris, which both have a reputation of being queer-friendly cities, hate crimes have increased in recent years. A report from Stonewall in 2017 found that 25% of London’s LGBT community had experienced harassment or assault.

Brazil’s second-largest city, Rio de Janeiro, has been branding itself as an LGBT tourist destination for years. It has made huge efforts in providing anti-bullying projects aimed at students, and has outlawed discrimination in nightclubs. However, the last year has seen record numbers of violent attacks against the queer community.

Brazilian President Jair Bolsonaro once said: ‘Yes, I’m homophobic – and very proud of it.’ Photograph: Evaristo Sa/AFP/Getty Images

And with a newly elected far-right government, there are fears it could get worse.

“With the election of an openly homophobic president, Jair Bolsonaro, who has infamously said he would rather have a dead son than a gay son, Rio’s reputation as a destination city may falter, and violence increase,” Reid says. “Rio is seen as a liberated city, but also has high levels of [homophobic] violence.”

‘Gay Disneyland’

Conversely, in some countries with backward and dangerous attitudes to the LGBT community, such as Iran and Saudi Arabia, discreet but vibrant underground scenes can thrive. This is even the case in Russia, where activists say two people were killed last week and nearly 40 detained, as part of a new homophobic crackdown by police in the Chechnya region.

“You’ll find a gay scene in many places that may surprise you,” says Ed Salvato, an LGBT travel expert. “Some places like Moscow and St Petersburghave vibrant gay communities, despite the homophobic laws there.”

In Dublin, an exciting scene exploded out of a staunchly Catholic country.

“Dublin is like gay Disneyland now, and that wasn’t the case 20 or 30 years ago,” says Prof Andrew Reynolds, founder of the University of North Carolina’s LGBTQ Representation and Rights Research Initiative.

“With the last couple of referendums, Ireland and Dublin have embraced their new presentation as an inclusive, progressive and loving place.”

When Reynolds visited Ireland in 2016, many from the LGBT population told him stories of growing up in conservative coastal towns and moving away due to prejudice. The country was the first to legalise gay marriage by popular vote, in a 2015 referendum with a yes vote of 62%.

He says: “They went to Australia. They went to America. Now they’ve come home.”

Ireland became the first country in the world to adopt same-sex marriage by popular vote in 2015. Photograph: Cathal McNaughton/Reuters

Progress in politics

The political glass ceiling has broken for many LGBT people across the world, which inevitably has ripple effects on the community.

Minneapolis made US history last year by electing Andrea Jenkins, the first openly trans woman of colour to office in 2017. The gay stronghold of Palm Springs, California, has elected an entire city council that identifies as LGBT. And in November, Jared Polis became the first openly gay man to be elected as a US state governor.

In Poland, one of Europe’s most Catholic and conservative countries, voters in the small city of Slupsk this year elected a gay atheist mayor, Robert Biedron. Just a few years ago, Biedron was attacked on the streets of his city because of his sexuality.

In Kathmandu, Nepal, Sunil Pant became Asia’s first openly gay federal-level elected official in 2008, resulting in a spate of public scrutiny.

“I think that the spinoff is that Kathmandu is a lot more gay-friendly than it was before,” says Reynolds. “Whilst it is not perfect by any stretch, like Bogotá, it is a place now that I feel like is much more friendly and accepting – and that’s obviously coming from a place where the Hindu religion was not helpful before.”

As the most direct representatives of citizens, city officials are uniquely positioned to understand and address the needs of their communities, says Xavier Persad of the Human Rights Campaign, pointing to “the need to provide for one’s family without the fear of being fired, to secure housing without the fear of eviction, and to participate in community life”.

“When cities enact LGBTQ-inclusive protections,” he adds, “they send a clear message that they value and welcome everyone, attracting the country’s top talent and spurring economic growth.”

Ultimately, even the most progressive laws and equal representation at political levels do not necessarily reflect the efficiency of enforcement, or indeed capture the lived experience of discrimination and fear many LGBT people face every day.

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, and explore our archive here