This article was previously published by the Thomson Reuters Foundation as part of its exploration of the historic impact of the Stonewall riot.
When Tree Sequoia joined hundreds of LGBT+ people rioting in downtown New York 50 years ago, same-sex relations were illegal in more than 100 countries and every U.S. state had anti-sodomy laws.
"(The police) came in nasty," he told the Thomson Reuters Foundation outside the Stonewall Inn where the modern LGBT+ rights movements began on June 28, 1969, after a police raid.
"They pushed the wrong person and that person pushed them back and before you know it, they were beating up the cop and that started the whole rebellion."
Fast forward half a century and gay sex remains illegal in 69 countries and can be punished with death in seven nations.
Exclusive data analysis by the Thomson Reuters Foundation showed while more countries are using legal clout to recognize LGBT+ rights, the pace of change has stalled in many countries amid an escalating conservative and religious backlash.
"There is a great danger in being complacent," said Eric Marcus, author of "Making History: The Struggle for Gay and Lesbian Equal Rights, 1945-1990".
Campaigns for LGBT+ rights meet resistance, particularly in countries where conservative religions sway politics such as in Africa, the Middle East and Latin America .
Analysis of data from LGBT+ rights groups ILGA, Lambda Legal, Stonewall and external sources found 13 countries decriminalized gay sex in the 1970s and 26 in the 1990s.
But this dipped to five nations in the 1980s as the global HIV/AIDS epidemic dissuaded countries from action.
"This hindered the progress which we were making at the time towards social acceptance," said Matthew Hodson, executive director of NAM aidsmap, a British HIV/Aids information charity.
Twelve countries removed laws punishing same-sex relations in the 2000s, and 13 have lifted bans since 2010.
But it remains illegal to be gay in 32 of 54 countries in Africa. In the Asia-Pacific region, 18 countries outlaw same-sex relations and it is illegal to have gay sex in 10 Middle East nations.
The analysis found in Europe progress has slowed amid a conservative backlash highlighted by anti-gay rhetoric in some campaigns during European Union elections in May, such as Spain's far-right Vox party challenging LGBT+ rights.
"Sadly, this year we see concrete evidence of roll-back at political and legislative levels in a growing number of countries," said Evelyne Paradis, executive director of ILGA-Europe, a network of about 600 LGBT+ organisations.
The challenges remain 50 years after that night when Sequoia, then 30, was dancing in the Stonewall Inn and police raided the bar.
Debate rages still over who threw the first punch or first bottle, but for the first time the gay community fought back.
A parking meter was ripped out of the ground and used as a battering ram to get to the police. A rock was thrown through the window of the Stonewall Inn, followed by a lit garbage can, and the numbers of protesters grew and grew.
"There is the potential for what happened here to inspire people around the world," said Marcus.
Thousands marched in Chicago, New York, Los Angeles and San Francisco in 1970 to mark the first anniversary of the riots - and today more than 60 countries hold annual Pride marches.
However, the Trump administration ruled this month that the rainbow freedom flag should not be flown on U.S. embassy flagpoles during Pride Month in June.
"The gay pride flag is offensive to Christians and millions of people of other faiths, not only in this country but around the world," Franklin Graham, president of the Billy Graham Evangelistic Association, wrote in his Facebook page welcoming the decision.
More on the LGBT+ Experience
The battle in the global west has moved onto surrogacy and adoption laws, and intersex and trans rights, say campaigners. While in Asia and Africa, more fundamental battles for legalisation of gay sex and marriage equality are underway.
The past 12 months have been indicative of a growing split in how countries treat LGBT+ citizens.
This year Botswana and Angola decriminalised same-sex relations while Ecuador and Taiwan voted to allow same-sex marriage, following in the footsteps of 26 earlier nations.
But in May, Kenya upheld a ban on same-sex relations and Brunei announced it would impose the death penalty for gay sex, only overturning its decision after a global outcry.
Within a year, marches were held in New York, Los Angeles, San Francisco and Chicago.
A total of 69 countries still criminalise gay sex with Britain's colonial past casting a long shadow globally.
Of the 53 countries in the Commonwealth, gay sex remains banned in 34, with British Prime Minister Theresa May in 2018 apologising for inflicting anti-gay laws on member nations.
But Commonwealth Secretary General Patricia Scotland said change was happening and seven of nine countries to lift bans in the past five years were Commonwealth members: Belize, Botswana, India, Mozambique, Nauru, Seychelles and Trinidad and Tobago.
"Our approach has been to work with national level institutions ... by harnessing their capabilities to advocate for and champion LGBT equality and inclusion," she said.
Many expected Kenya to follow Angola, which scrapped its "vices against nature" law in January, but Kenya upheld its ban.
Across the Middle East, social attitudes remain firmly against liberalising laws governing homosexuality.
A 2013 Pew Research Center report found the majority of people in Jordan, Egypt and Lebanon favoured a ban on gay sex.
Intersex rights are also emerging globally, with questions raised about the appropriateness of corrective surgery for people born with atypical chromosomes or sex characteristics.
In the United States, LGBT+ rights activists are pushing for a nationwide ban on "gay conversion therapy" for minors, a widely discredited attempt to alter sexual orientation or gender identity through psychological, spiritual or physical means.
Worldwide, Malta, Ecuador and Brazil have banned conversion therapy, while Britain, parts of Canada and Australia are mulling bans, said ILGA, a network of LGBT+ rights groups.
"Everyone thinks when marriage (equality) happened that a lot of things just got much better – and they did, but at a cost," said Sam Brinton, head of advocacy at suicide-prevention group The Trevor Project, which has been spearheading the move.
"We forgot the challenges still happening in our community."
Each continent poses unique challenges for LGBT+ citizens.
In Europe, gay sex has been decriminalised across the continent and 28 nations out of 44 allow some form of same-sex marriage or civil unions.
The frontline has now moved to recognition of transgender and intersex issues, said Paradis of ILGA-Europe.
"Those countries that continue to do really well are those that ... clicked quite some time ago that the agenda was more than marriage equality," Paradis said.
Asia has shown signs of change. India legalised gay sex last year and this month a Hong Kong court ruled the husband of a gay civil servant deserved the same benefits as straight colleagues.
Yet flashpoints remain, such as in Malaysia and Indonesia, where cultural conservatism and a religious backlash against same-sex relations influences policymakers, said Suki Chung, an LGBT+ campaigner at Amnesty International in Hong Kong.
"I don't understand this gay marriage," Malaysia Prime Minister Mahathir Mohamad recently told the Cambridge Union, the debating society of the British university. "Marriage is about producing children. Gay marriage, do they get children?"
South Africa is the only country in Africa to allow same-sex marriage, with many nations resistant to what some politicians and church leaders call the "western disease" of homosexuality.
Resistance to homosexuality remains firm in the Catholic Church although Pope Francis famously said: "Who am I to judge?"
Fifty years on, Stonewall remains a symbol, said LGBT+ rights activist Power.
"I think it's unfortunate that people argue over who threw the first brick because the relevant thing is not who threw the first brick, but who built the movement, who stayed around and who actually did the tough work," she said.
Many campaigners - from non-governmental organisations and the business community - remain optimistic for the future, but recognise there is still much work to be done.
"In the end I am very optimistic but we have a rough couple of years to get through." said Wall Street veteran Charles Myers, founder of Signum Global Advisors.
But the advances this year have offered cause for optimism.
"We're witnessing an important moment in history as these victories will send out positive shockwaves across the world and inspire more activists to continue their fight for LGBT+ rights," said Mathias Wasik, director of programs at international LGBT rights group All Out.
The focus on rights has switched in the global west to look at family-based issues surrounding surrogacy and adoption laws as well as intersex and trans rights, activists said.
Yet while it has become commonplace to presume the fight for LGBT+ rights has largely been won, campaigners must not become complacent, said author and LGBT+ historian Marcus.
"That's decades in the making, if not centuries." he said.