(CNN) -- Amnesty International is calling on Zambia to release two men who have been in jail since May on charges of engaging in homosexual acts "against the order of nature."
James Mwansa and Philip Mubiana, both 22, will appear in court Monday for a judge to decide if they should be detained longer.
"It is high time that individuals stopped being persecuted because of their real or perceived sexual orientation or gender identity. Human rights are about the dignity and equality of all people," said Simeon Mawanza, Amnesty International's Zambia researcher.
The pair was arrested after a neighbor reported them to the police, according to Amnesty International.
Authorities subjected them to anal examinations without their consent and forced them to confess, the human rights group said.
"Anal examinations conducted to 'prove' same-sex conduct are scientifically invalid, and 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 Simeon Mawanza, an Amnesty researcher in Zambia.
It was the second detention for the two men in recent days, the group said. On April 25, authorities arrested them, and later released them on bail on May 2.
They were arrested again just four days later after a neighbor went to the police, according to Amnesty. Both have pleaded not guilty.
Zambian officials were not immediately available for comment.
Homosexuality is illegal in Zambia and most African countries based on remnants of sodomy laws introduced during the British colonial era and perpetuated by cultural beliefs.
Punishments across the continent range from fines to years in prison.
Last year, a Cameroon appeals court upheld a three-year sentence against a man convicted of homosexuality for texting his male friend to say, "I'm very much in love with you."
South Africa -- one of the more progressive nations in the continent on the issue -- was the first African country to impose a constitutional ban on discrimination based on sexual orientation.
But sexual violence against lesbians has become so common in South Africa, the nation has coined the term "corrective rape" to describe it.
A handful of other nations issue a death penalty for consensual same-sex relations, including Saudi Arabia and Iran, according to the International Lesbian, Gay, Bisexual, Trans and Intersex Association.