Image copyright Getty Images

Gay rights activists from Commonwealth countries are demanding that laws banning homosexuality should be overturned.

Campaigner Peter Tatchell has said people face violence and imprisonment just because they are gay.

The British Foreign Secretary, Boris Johnson, promised the Olympic diver Tom Daley that he would raise the issue at the Commonwealth summit.

So, where is homosexuality still outlawed?

There are 53 countries in the Commonwealth and most of them are former British colonies.

Out of those, 37 have laws that criminalise homosexuality.

That number will fall by one after a court ruling in Trinidad and Tobago this month found that laws banning gay sex were unconstitutional.

However there may be an appeal.

Image copyright Getty Images Image caption After winning a gold medal, Daley tweeted about the number of countries competing at the Games that criminalise homosexuality.

Many of the laws criminalising homosexual relations originate from British colonial times.

And in many places, breaking these laws could be punishable by long prison sentences.

The International Lesbian, Gay, Bisexual, Trans and Intersex Association (Ilga) monitors the progress of laws relating to homosexuality around the world.

According to its research, there have been arrests for homosexual acts in 15 Commonwealth countries in the last three years.

For instance, in 2017 the BBC reported that 40 men in Nigeria had been arrested during one weekend for performing homosexual acts.

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".

On the other hand, some countries' existing laws have been tightened, including Nigeria and Uganda.

Countries that criminalise homosexuality today include criminal penalties against women who have sex with women, although the original British laws applied only to men.

Meanwhile activist groups say the ability of lesbian, gay, bisexual and trans (LGBT) organisations to carry out advocacy work is being restricted.

A spokesperson from the Commonwealth Secretariat said: "We work with national human rights commissions to help encourage national dialogue when it comes to LGBTi rights.

"They are in the unique position of being able to advise government and parliament."

Image copyright AFP Image caption An Indian gay rights activist protests a ruling in the Supreme Court in 2013 that upheld a law which criminalises gay sex.

There is a global trend toward decriminalising same-sex acts and some Commonwealth countries have taken similar steps in the last few years.

Despite many differences among Commonwealth countries, similar legal frameworks and a shared language make advocacy and initiatives for reform easier, says Tea Braun, director of the Human Dignity Trust, which advises on gay rights legal cases.

For instance, in Belize, laws that criminalise same-sex acts were struck down by the court in 2016 and in the same year the parliaments in the Seychelles and Nauru voted to decriminalise homosexuality.

The year before, Mozambique dropped a colonial-era clause outlawing "vices against nature".

What next?

Campaigners around the world are involved in a number of legal cases and some high profile ones may come to a conclusion in the near future.

This year the high court in Kenya is due to announce a judgement on whether it will remove sections of its penal code that criminalise homosexuality.

A decriminalisation case has been started in Botswana.

Judges in the Supreme Court in India said they will review a colonial-era law that was reinstated in 2013.

The Indian law that banned gay sex was initially overturned in 2009.

Meanwhile Sri Lanka has included references to sexual orientation and gender identity in its revised draft constitution.

Full list of countries where homosexuality is outlawed:

Botswana

Cameroon

Gambia

Ghana

Kenya

Malawi

Mauritius

Namibia

Nigeria

Sierra Leone

Swaziland

Uganda

Tanzania

Zambia

Bangladesh

Brunei Kingdom

India

Malaysia

Pakistan

Singapore

Sri Lanka

Antigua and Barbuda

Barbados

Dominica

Grenada

Guyana

Jamaica

St Lucia

St Kitts and Nevis

St Vincent and the Grenadines

Kiribati

Papua New Guinea

Samoa

Solomon islands

Tonga

Tuvalu

Read more from Reality Check

Send us your questions

Follow us on Twitter