Homosexuality: The countries where it is illegal to be gay
US Vice-President Kamala Harris who is on a tour of three African countries - Ghana, Tanzania and Zambia - has drawn criticism over her support for LGBTQ rights.
In Ghana, in a speech calling for "all people be treated equally" she appeared to criticise a bill before the country's parliament which criminalises advocacy for gay rights and proposes jail terms for those that identify as lesbian, gay, bisexual, or transgender.
The country's Speaker Alban Bagbin later called her remarks "undemocratic" and urged lawmakers not to be "intimidated by any person".
In Tanzania, a former minister spoke against US support for LGBTQ rights ahead of the visit and in Zambia some opposition politicians have threatened to hold protests.
Where is homosexuality still outlawed?
There are 64 countries that have laws that criminalise homosexuality, and nearly half of these are in Africa.
Some countries, including several in Africa, have recently moved to decriminalise same-sex unions and improve rights for LGBTQ people.
In December 2022, Singapore's parliament repealed a controversial law which banned sex between men.
In the same month, the high court in Barbados struck out laws that criminalised gay sex.
In July last year, the courts in Antigua and Barbuda declared a law criminalising same-sex acts between consenting adults unconstitutional.
In February 2021, Angola's President Joao Lourenco signed into law a revised penal code to allow same-sex relationships and ban discrimination on the basis of sexual orientation.
In 2020, Gabon reversed a law that had criminalised homosexuality and made gay sex punishable with six months in prison and a large fine.
Botswana's High Court also ruled in favour of decriminalising homosexuality in 2019. Mozambique and the Seychelles have also scrapped anti-homosexuality laws in recent years.
But there are countries where existing laws outlawing homosexuality have been tightened, including Nigeria and Uganda.
Uganda's parliament recently passed a law to crack down on homosexual activities, prompting widespread condemnation.
And in some countries, efforts to get the laws removed have failed.
In May 2019, the high court in Kenya upheld laws criminalising homosexual acts. In February his year Kenya's highest court ruled that it was wrong for authorities to ban the gay community from registering a rights organisation. but it stressed that gay sex remains illegal.
Colonial legacy
Many of the laws criminalising homosexual relations originate from colonial times.
And in many places, breaking these laws could be punishable by long prison sentences.
Out of the 53 countries in the Commonwealth - a loose association of countries most of them former British colonies - 29 have laws that criminalise homosexuality.
Although the original British laws applied only to men, countries that criminalise homosexuality today also have penalties for women who have sex with women.
The International Lesbian, Gay, Bisexual, Trans and Intersex Association (Ilga) monitors the progress of laws relating to homosexuality around the world.
It says the death penalty is the legally prescribed punishment for same-sex sexual acts in Brunei, Iran, Mauritania, Saudi Arabia, Yemen and in some northern states of Nigeria.
In five countries - Afghanistan, Pakistan, Qatar, Somalia, and the United Arab Emirates - there is no legal clarity and the death penalty could be applied.
Sudan repealed the death penalty for consensual same-sex sexual acts in 2020.
Some observers note that the risk of prosecution in some places is minimal.
For example, a 2017 report on Jamaica by the UK Home Office said that Jamaica was regarded as a homophobic society, but that the "authorities do not actively seek to prosecute LGBT persons".
Activist groups say the ability of lesbian, gay, bisexual and trans (LGBT) organisations to carry out advocacy work is being restricted.
Changing trend
There is a global trend toward decriminalising same-sex acts.
So far, 33 countries in the world recognise same-sex marriages, and 34 others provide for some partnership recognition for same-sex couples, Ilga says.
In Africa, same-sex marriages and civil unions are only legal in South Africa, and the French Islands of Mayotte and Reunion.