In the United States and many other parts of the world, this is a worrisome time for LGBT activists, as the pace of civil rights victories has grown uneven and reports of anti-LGBT violence and persecution surface relentlessly.
In the past two months, there have been large-scale detentions of gay men in Nigeria and Bangladesh, and chilling accounts of roundups and torture of scores of gays in Chechnya. In Indonesia, a major police raid on a gay sauna was followed two days later by the public caning of two gay men.
More than 70 countries continue to criminalize gays' sexual activity.
Taiwan is now on track to become the first territory in Asia to legalize same-sex marriage, due to a May 24 court ruling. Worldwide, gay and lesbian couples can marry in only 22 of the world's nearly 200 countries. No nation in Eastern Europe is among them, and there is only one in Africa: South Africa.
Collectively, recent developments have changed the way some lesbian, gay, bisexual and transgender activists are viewing the annual Pride Month events coming up in June. It's usually a time of celebration, but this year InterPride, which helps organize Pride events worldwide, says people should participate "to tell the world that they will not be silent in the face of oppression."
A large-scale "Equality March" is planned for June 11 in Washington, D.C. Its organizers say anti-LGBT rhetoric and continuing discrimination warrant a mass mobilization.
"2017 is very different," said InterPride's president, Sue Doster. "After years of progress on many fronts, we now have fervent opponents of LGBTQ equality in control of every branch of the U.S. government."
Activists in the U.S. rejoiced in 2015 over a Supreme Court ruling that legalized same-sex marriage nationwide. Yet most U.S. states still lack statewide laws banning discrimination against LGBT people, and majority Republicans in Congress show no interest in passing a Democratic-backed bill that would provide nationwide non-discrimination protections.
While still pushing for further gains, activists have expended much energy playing defense as state legislators, mostly Republicans, introduced scores of bills this year viewed at hostile to LGBT rights. Most of the measures failed, but some have been signed into law, including bills in South Dakota and Alabama protecting faith-based adoption organizations that refuse to place children with gay parents. A similar bill has reached the governor's desk in Texas.
At the federal level, LGBT activists were dismayed when President Donald Trump's administration revoked federal guidelines advising public school districts to let transgender students use the bathrooms and locker rooms of their choice. Several of Trump's high-level appointees, as well as Vice President Mike Pence, are viewed by activists as long-term opponents of gay-rights advances.
"He's taken our chief enemies and put them in charge of our government," said Chad Griffin, president of the Human Rights Campaign. "It's a devastating reversal of our progress over the last decade."
Under President Barack Obama, the U.S. government made LGBT rights an important part of its foreign policy. Griffin says the Trump administration is not sustaining this approach, to the alarm of activists abroad. "There is zero leadership on the global stage," he said.
On his initial overseas trip as president, Trump stopped first in Saudi Arabia and made no public mention of human rights issues, including the kingdom's policies criminalizing homosexual activity. "We are not here to lecture," he said.
Activists complain that the Trump administration has said relatively little about the reported abuses of gays in Chechnya, in contrast to strong statements by Chancellor Angela Merkel of Germany and Prime Minister Theresa May of Britain.
Among recent events that have alarmed LGBT and human rights activists:
—In Indonesia, animosity toward the LGBT community has been whipped up by anti-gay comments from cabinet ministers and other public figures. In the capital, Jakarta, police detained 141 men in a May 21 raid on a gay gym and sauna. On May 23, on orders from an Islamic Shariah court, two men received more than 80 lashes of the cane for having sex together; hundreds of onlookers jeered at them.
—In Bangladesh, authorities made 27 arrests in a May 19 raid on a group of gay men at a community center near the capital, Dhaka. Last year, a leading LGBT activist, Xulhaz Mannan, was hacked to death in Dhaka by suspected militants.
—In Nigeria, police arrested more than 50 young men celebrating a gay wedding in April. Nigerian law bans gay marriage; violators can be punished by up to 14 years in prison.
—In Moldova, President Igor Dodon spoke out against an LGBT parade organized in the capital city, and said he did not consider himself to be president of the Eastern European country's gays.
—In El Salvador, multiple killings of transgender women drew the attention of the United Nations human rights office, which urged Salvadoran authorities to investigate.
Graeme Reid, director of Human Rights Watch's LGBT Rights Program, says the setbacks for LGBT people interconnect with gains achieved on their behalf.
"That's the paradox of this time in which we live," he said. "The two are related: the progress and the mobilization of forces in opposition to that progress."
In Romania, for example, lawmakers wary of the spread of same-sex marriage elsewhere are seeking to amend the constitution to explicitly state that marriage is a union between a man and woman. Slovenia recently began recognizing civil partnerships for same-sex couples after voters in a referendum overwhelmingly rejected a bill to legalize full-fledged same-sex marriage.
Phillip Ayoub, a professor of politics at Drexel University in Philadelphia, said LGBT people in eastern Europe have been concerned by the rise of populist and nationalist political movements in Poland, Hungary and elsewhere that depict LGBT activism as a threat to family values. Yet he noted that Hungary recognizes same-sex partnerships, and Poland recently had a transgender woman serving in Parliament.
Countries that have balked at embracing same-sex marriage include several widely viewed as welcoming to LGBT people.
Australia provides extensive protections and rights to LGBT people. But recent attempts to legalize same-sex marriage have been bogged down over whether there should be a national plebiscite on the issue or whether Parliament alone should decide.
Germany recognizes registered partnerships of same-sex couples, but has not moved to full-fledged marriage equality due to opposition from Merkel's Christian Democratic Union. France is among 13 Western European nations that has legalized same-sex marriage, yet last October tens of thousands of people marched in Paris to oppose it.
In Mexico, same-sex marriage has been the focus of bitter debate and legal complications for several years. It's been formally legalized in about a dozen states and cities, including Mexico City, but most of the 31 states have not taken that step.
The Philippines, one of the most LGBT-friendly nations in Asia, grants no legal recognition to same-sex couples. The speaker of the House, Pantaleon Alvarez, has yet to follow through with a promise to introduce a bill that would legalize civil unions.
Jessica Stern, executive director of the global LGBT-rights group OutRight Action International, said activists worldwide must keep pressing for expanded rights even when governments resist or delay.
"The answer isn't to say we give up because we live in a time of backlash," she said. "We have to work twice as hard."
Associated Press writers Jovana Gec in Belgrade, Serbia, Johnson Lai in Taipei, Taiwan, and Teresa Cerojano in Manila, Philippines, contributed to this report.
Clarifies that Taiwan is now on track to become the first territory in Asia to legalize same-sex marriage.