Two Zambian men have pleaded not guilty during a court appearance in the small central town of Kapiri Mposhi to a charge of engaging in homosexual acts.
James Mwape and Philip Mubiana, both 22, have been charged with four counts of committing "unnatural" sexual acts.
Zambia is a socially conservative country and homosexual acts carry a jail sentence of up to 14 years.
The government has resisted pressure from campaign groups and Western governments to scrap the law.
Amnesty International called for the immediate release of Mr Mwape and Mr Mubiana, saying it regarded them as prisoners of conscience.
"The arrest of the two men solely for their real or perceived sexual orientation amounts to discrimination and it is in violation of their rights to freedom of conscience, expression, and privacy," said Simeon Mawanza, Amnesty International's Zambia researcher.
Last month, local human rights activist Paul Kasonkomona was arrested soon after appearing on a live television programme in the capital, Lusaka, calling for homosexuality to be decriminalised.
He was charged with being idle and disorderly in a public place. He denied the charge, and was freed on bail.
Mr Mwape and Mr Mubiana have been arrested twice in the last few days following allegations that they have engaged in homosexual acts, reports the BBC's Mutuna Chanda from Lusaka.
Police first arrested them over the weekend, apparently after a tip-off, he says.
They were released on bail on Monday after undergoing medical examinations to check if they had engaged in homosexual acts, our reporter says.
Mr Mwape and Mr Mubiana were re-arrested the next day for allegedly having sex on the night of their release, he says.
Amnesty International said it had learned from sources in Zambia that a neighbour had reported the men, who had a poor level of literacy and had not yet met a lawyer.
"Anal examinations conducted to "prove" same-sex conduct are scientifically invalid and, furthermore, if they were conducted without the men's consent, contravene the absolute prohibition of torture and other cruel, inhuman and degrading treatment or punishment under international law," said Mr Mawanza.
"In addition, the doctors who conduct these examinations, by doing so forcibly, violate their ethical obligations towards people they examine," he added.
The courtroom in Kapiri Mposhi was packed with onlookers as such cases are almost unheard of, our correspondent adds.
The two men were remanded in police custody until their trial starts on 22 May.
In 2011, both the UK and US warned they would use foreign aid to push for homosexuality to be decriminalised in Africa.
South Africa is one of the few African countries where it is legal.