Ecuador's decision to allow same-sex marriage has topped a landmark week for LGBT+ rights after Botswana decriminalised gay sex and Bhutan took the first steps to do so, said campaigners marking the 50th anniversary of the gay equality movement.
Five of nine judges in Ecuador's top court on Wednesday ruled in favor of two gay couples who sued after their request to be married was denied by the country's civil registry.
The Latin American nation is the 27th country to allow same-sex marriage with the move coming during the annual gay Pride month and events to mark the 50th year of the Stonewall riots in New York that gave rise to the global movement for LGBT+ rights.
A day earlier Botswana's top court voted to decriminalise homosexuality and Bhutan's lower house six days ago voted to repeal a similar law that needs upper chamber approval. This would leave 68 nations where same-sex relations are illegal.
"The victories we've witnessed in the last couple of weeks will improve the lives of millions of LGBT+ people around the world," said Mathias Wasik, director of programs at international LGBT rights group All Out.
"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," he told the Thomson Reuters Foundation by email.
Despite the recent milestones, however, LGBT+ rights advocates cautioned that significant global challenges remain.
In May, Kenya's high court upheld the country's ban on gay sex, so same-sex relations remain punishable by 14 years in jail, and Brunei announced but then reversed a decision to impose death by stoning for gay sex after a global backlash.
Campaigns in some countries during parliamentary elections in the European Union in May were characterized by anti-gay rhetoric including by Poland's Law and Justice Party and Spain's far-right Vox party challenging acceptance of LGBT+ rights.
In the United States in January, the Supreme Court lifted lower court rulings that blocked a Trump administration ban on certain transgender people from serving in the U.S. military, allowing the policy to go into effect.
"Whenever there's progress, there's always steps backwards," said Neela Ghoshal, senior researcher in the LGBT rights program at Human Rights Watch.
Voters worldwide have supported leaders with anti-gay views.
Last year Brazilians elected far-right leader Jair Bolsonaro as president, a man who once said he would rather his son die in an accident than bring home a male partner.
Campaigns for LGBT+ rights have been met with steep resistance, particularly in countries where the influence of conservative religion sways politics such as in countries in Africa, the Middle East and Latin America.
"Conservatives around social issues, particularly religious conservatives, take progress (on LGBT rights) as a threat to their belief system," said Ghoshal.
In Ecuador, where the church is very influential, the Life and Family movement, a right-wing Christian group, led much of the opposition to same-sex marriage.
They argued marriage was determined by a 2008 constitution, which granted civil unions to same-sex couples, and any further changes required a referendum or amendment in parliament.
"The vast majority of the Ecuadorian people, through referendum, approved a constitution that ... reserved marriage for heterosexual, male/female couples," Carlos Arsenio Larco, a lawyer for the group, told local TV channel El Comercio.
Ecuador's LGBT+ community celebrated the decision.
"After a fight of almost 20 years, gay marriage has been achieved. It gives us a guiding light for many other proposals on human rights," said Diane Rodriguez, president of the Ecuadorian Federation of LGBTI Organizations and the first trans woman elected to Ecuador's National Assembly.