Homosexual acts are outlawed in Botswana -- one of Africa's most stable, democratic nations -- under the country's penal code of 1965.
An unnamed applicant is challenging two sections of the code that threaten offenders with a jail sentence of up to seven years.
Last month, Kenya's high court refused to scrap laws criminalising homosexuality, dealing a blow to the country's gay community that rippled across a continent where homophobia is rife.
Gay rights organisations had hoped Kenya would follow in the footsteps of African nations like Angola, or those further afield like India, and end decades-old laws which criminalise gay sex.
"After an effort by activists to decriminalise same-sex relations through Kenya's High Court met a bitter defeat last month, all eyes are on Botswana," Neela Ghoshal, a specialist in lesbian, gay, bisexual, and transgender law at the Human Rights Watch group, told AFP.
"A positive ruling would give hope to an embattled but resilient African LGBT rights movement.
"It would also demonstrate that Botswana takes seriously its commitments to equality and non-discrimination."
Twenty-eight out of 49 countries in sub-Saharan Africa have laws penalising same-sex relationships, according to Ghoshal.
Plea for tolerance
At the Botswana high court hearing in Gaborone in March, lawyers read a statement from the applicant.
The laws "limit me to interact with others who identify in the same way for fear of imprisonment," said the applicant identified only by the initials LM.
"We are not looking for people to agree with homosexuality but to be tolerant."
The state argued that Botswana society was not yet ready to change its attitude towards homosexuality.
But Botswana, a sparsely populated country of just two million people, has shown signs of increasing tolerance of sexual orientation 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 that legal battle after the Home Affairs ministry rejected an application to register the Lesbians, Gays, and Bisexuals of Botswana (LEGABIBO) organisation.
President Mokgweetsi Masisi last year told a meeting on gender-based violence that 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.
Botswana, in southern Africa, is famed for its abundant wildlife and its diamond mines.
It is also one of the countries most affected by HIV in the world, with a 22.8 percent adult infection rate, despite providing universal free antiretroviral treatment.