The recent massacre at a gay nightclub in Orlando, Fla., has focused attention on the status of lesbian, gay, bisexual, transgender, intersex and questioning people in the United States.
Over the last decade, the country has made significant progress in terms of acceptance of this community, according to human rights advocates.
The military's "don't ask, don't tell" policy, which prohibited gay and lesbian personnel from serving openly in the armed forces, has been repealed, and sexual orientation has been added to the military's equal opportunity regulations.
Last year, the Supreme Court declared same-sex marriage legal in all 50 states. And the nation has its first special envoy for the human rights of lesbian, gay, bisexual, transgender and intersex people.
(Intersex individuals are those with "a reproductive or sexual anatomy that doesn't seem to fit the typical definitions of female or male," according to a definition from the Intersex Society of North America.)
That's not to say that everything is perfect. Members of the LGBTIQ community still face discrimination and remain a primary target of hate crimes, advocates say.
But living in the United States as an LGBTIQ individual is often safer than in many other parts of the world, where sexual orientation or gender identity can lead to execution, imprisonment or torture.
What's the status of LGBTIQ people in other countries?
It's "ever-evolving," said Helen Kennedy, co-secretary-general of the International Lesbian, Gay, Bisexual, Trans and Intersex Assn., based in Geneva.
Governments around the world have pursued initiatives aimed at reducing violence and discrimination, and in the last 10 years the number of countries that criminalize consensual same-sex activity has dropped from 92 to 73, Kennedy said in an email.
"However, these advances haven't wiped out the continuing human rights violations facing LGBTIQ persons everywhere in the world," she said. "Thousands of people have been killed or have suffered violent attacks; many more still have to face daily discrimination in healthcare, employment, education and housing."
Transsexual and intersex people often bear the brunt of the abuse because of their physical attributes, advocates say.
Where is being gay punishable by death?
There are 13 countries where the death penalty might be applied for same-sex sexual acts, according to Kennedy's organization.
These are countries that have large Muslim populations, and the sentencing derives from an interpretation of sharia, or Islamic law.
There are some, such as Nigeria and Somalia, where only certain regions impose capital punishment for homosexual acts.
Others -- including Mauritania, Afghanistan, Pakistan, Qatar and the United Arab Emirates -- have provisions for the death penalty in their legal codes but are not known to have carried it out in such cases.
And there are countries where local courts and non-state actors have summarily imposed the death penalty against homosexuals, including parts of Iraq and Syria controlled by the extremist group Islamic State.
Countries where the penalty can be implemented nationwide include Sudan, Iran, Saudi Arabia and Yemen.
The method of execution can include hanging, stoning, beheading or being thrown off a high building, as Islamic State reportedly favors.
What drives the lack of acceptance of homosexuals in some countries?
The greater visibility of gay people, while a welcome development, can expose the community to negative attention, activists say.
"The overall trajectory for a lot of LGBTIQ people is positive, but we're also seeing an acute backlash around the world," said Jessica Stern, executive director for OutRight Action International, an advocacy group. "The backlash is akin to what happens to many communities and movements when they stand up and advocate for their rights."
The labeling of homosexuals as immoral, perverts, pedophiles or mentally ill has been used as justification for their mistreatment, Stern said.
In Indonesia, for example, one lawmaker tweeted that LGBT people "should be put to death," the New York-based Human Rights Watch reported.
The mayor of a major city claimed milk formula and instant noodles "make babies gay"; and the country's defense minister equated Indonesia's LGBT rights movement with "a form of proxy war" more dangerous than nuclear warfare, according to the rights group.
Where has there been progress on gay rights?
Kennedy noted that in just the last three months, the Seychelles and Nauru decriminalized same-sex sexual conduct; Norway introduced a law allowing people to determine for themselves their gender; a non-discrimination law in employment came into force in Ukraine; marriage equality arrived in Colombia; Bolivia approved a law allowing transsexuals to change their names, genders and photos on official documents, and the Philippines elected its first transgender congresswoman.
Andrew Park, director of international programs at the Williams Institute at UCLA School of Law, added that a dozen countries now recognize some form of third gender.
There are also 22 nations that allow same-sex marriage and 25 that offer some degree of recognition for same-sex civil partnerships, according to Kennedy's organization.
Argentina was the first country in Latin America to allow gay and lesbian couples to marry in 2010, and New Zealand was the first in the Asia-Pacific region in 2013.
So is marriage equality the final goal?
Far from it, gay rights activists say.
In many countries, gays and lesbians have few ways to make their voices heard.
"The repression of human rights organizations makes it hard for LGBT communities to organize," said Stern, of OutRight.
The upholding of antiquated laws doesn't help.
This month, for example, a court in Kenya ruled that a colonial-era law that allows forced anal examinations for men suspected of being homosexual is constitutional.
Stern worries that the ruling will provide ammunition for those who claim that the "bodies of homosexual men are deformed, and by examining the anus you can detect this biological difference."
In the U.S., the Supreme Court ruled anti-sodomy laws unconstitutional in 2003 but they still remain on the books in some states.
Park, the UCLA professor, noted that greater protections are needed here against employment discrimination. "Congress has never passed a gay civil rights law," he said.
Meanwhile, a legal standoff continues between the federal government and nearly a dozen states over transgender bathroom access in schools.
"It is an ongoing struggle," said Kennedy about the fight for equal rights. "And shocking events like the Orlando shooting are dreadful reminders of the price far too many LGBTIQ persons, all around the world, have to pay simply for being who they are."
MORE NEWS FROM AROUND THE WORLD