Ecuador's decision to allow same-sex marriage has topped a landmark week for sexual diversity after Botswana decriminalised gay sex and Bhutan took the first steps to do so, say campaigners marking the 50th anniversary of the LGBT rights movement.

Key points: The Ecuadorian move comes amid the United States' Pride month

The Ecuadorian move comes amid the United States' Pride month Two gay couples prompted the top court challenge to the previous marriage law

Two gay couples prompted the top court challenge to the previous marriage law Sixty eight countries around the world continue to penalise homosexual relations

Five of nine judges in Ecuador's top court on Wednesday (local time) ruled in favour 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 and the move comes during the United States's annual Pride month, and a month after Taiwan became the first territory in Asia to pass same-sex marriage.

A day earlier, Botswana's top court voted to decriminalise homosexuality while Bhutan's lower house six days ago voted to repeal a similar law that needs upper chamber approval.

This would leave 68 nations where homosexual 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 said.

'There are always steps backwards'

Many countries in the Commonwealth continue to uphold British colonial-era sodomy laws. ( Flickr: Alisdare Hickson )

Despite the recent milestones, however, LGBT rights advocates cautioned that significant global challenges remain.

This week, the Vatican released an official document, that rejected terms such as "intersex" and "transgender", that was designed to clarify sex education in Catholic schools around the world.

Last month, Kenya's High Court upheld the country's ban on gay sex — which activists said would exacerbate existing violent prejudices — and Brunei announced a decision to impose death by stoning for gay sex but reversed it after a global backlash.

Anti-gay rhetoric also surfaced during the European Union's parliamentary elections, including by Poland's Law and Justice Party and Spain's far-right Vox party, who challenged the acceptance of LGBT rights.

In the US in January, the Supreme Court lifted lower court rulings that blocked a Trump administration ban on certain transgender people from serving in the US military, allowing the policy to go into effect.

"Whenever there's progress, there are always steps backwards," said Neela Ghoshal, senior researcher in the LGBT rights program at Human Rights Watch.

Conservative interpretations of religion block LGBT rights

Contemporary moves to welcome LGBT rights have sometimes been fought by religious conservatives. ( Wikimedia Commons: Jenny Mealing )

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 regions where the influence of conservative religion holds sway.

"Conservatives around social issues, particularly religious conservatives, take progress [on LGBT rights] as a threat to their belief system," said Ms Ghoshal.

In Ecuador 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 couples," Carlos Arsenio Larco, a lawyer for the group, told local TV channel El Comercio.

Ecuador's LGBT community celebrated the majority court 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 LGBT organisations and the first trans woman elected to Ecuador's National Assembly.

ABC/Reuters