Two men subjected to anal examinations are seeking a
Kenyan court ruling declaring enforced examinations unconstitutional.
This was after they were subjected to such tests last year to see if they had been involved in gay sex, their lawyer said on Tuesday.
Rights activists have condemned the examinations as inhuman and humiliating.
New York-based Human Rights Watch said such coerced examinations might amount to torture under international law.
Kenya, like many African nations, outlaws homosexuality.
The law calls for jailing of those involved in homosexual acts, but violations are rarely prosecuted.
In court papers filed in September, the two men, whose names have not been made public, alleged that they were coerced to take the anal examination by security personnel and a public hospital in Mombasa in February 2015.
Sande Ligunya, the men's lawyer, told Reuters a court in Mombasa would conduct the first hearing on Wednesday.
Police said they could not comment on the men's claims since they were a subject of court proceedings.
In the petition, the men say they want the court to declare that forced anal examination "amounts to degrading treatment" and "a violation of human and constitutional rights".
On a visit to
Kenya last July,
US President Barack Obama equated discrimination against gays to treating people differently because of race.
He said: "That's the path whereby freedoms begin to erode."
Human Rights Watch senior researcher Neela Ghoshal said the medical procedures "accomplish nothing, other than humiliating and demeaning people who are considered moral 'outcasts'.