The High Court in Botswana on Thursday started hearing an application seeking to decriminalise homosexuality, in a landmark case for Africa's legal response to same-sex relationships.
Botswana is touted as one of Africa's most democratic nations, yet homosexuality is outlawed under the country's penal code of 1965.
An unnamed applicant is challenging two sections of that code under which offenders face a jail sentence of up to seven years.
"These sections... limit me to interact with others who identify in the same way for fear of imprisonment," said the applicant in documents read by lawyer Gosego Lekgowe in the High Court in Gaborone.
"We are not looking for people to agree with homosexuality but to be tolerant," said the applicant identified by their initials LM.
Scrapping the relevant laws would help gays and lesbians to more easily access health care and treatment, and "will also affirm basic human rights and the diversity of the Botswana nation", said the argument.
Botswana has slowly become more tolerant of homosexuality in recent years.
In 2016 the country's appeal court ruled that the government was wrong to refuse to register an organisation that represents homosexuals and other minority sexual groups.
Activists had launched the legal battle after the Home Affairs ministry rejected an application to register the Lesbians, Gays, and Bisexuals of Botswana (LEGABIBO) organisation.
Lawyer Lekgowe said public opinion on same-sex relationships had evolved and employment laws now even outlaw discrimination on grounds of sexual orientation.
President Mokgweetsi Masisi previously addressed a meeting on gender-based violence saying there are "many people of same sex relationships in this country who have been violated and have also suffered in silence".
"Just like other citizens, they deserve to have their rights protected," said the president at the December gathering.
Twenty-eight out of 49 countries in sub-Saharan Africa have laws penalising same-sex relationships, according to Neela Ghoshal, a specialist in lesbian, gay, bisexual, and transgender rights at the Human Rights Watch group.
The death penalty is on the books, under sharia, in Mauritania, Sudan and northern Nigeria, although there have been no known executions in recent times.
In southern Somalia, gay men are believed to have been put to death in territory ruled by the Al Shabaab jihadist group.
However, Angola, Mozambique and Seychelles have scrapped anti-gay laws in recent years, and the High Court in Nairobi is mulling whether Kenya follows suit.