It was early in the morning when Jackson Mukasa was awakened by the chants outside his Kampala home.
"The homos are in there!" the crowd yelled, banging spoons on metal cooking pots.
Mukasa, a 21-year-old gay man living in the Ugandan capital, was terrified.
"We opened the door, and there were police and people everywhere. The local councilman was there, yelling 'Out with the homos! You are scaring people in the area.' I still have scars from the beatings that followed," Mukasa said.
It was January 2014. After being beaten by the mob, the police took Mukasa and a male friend staying with him in for questioning, he said.
They were both subjected to forced anal examinations, said Mukasa.
"We were questioned, beaten again, forced to admit to homosexuality. They took us to … (a) clinic in Kampala where we were examined," he told the Thomson Reuters Foundation.
"It is so painful. The doctor puts a machine up your rectum. It hurts so much, and there is blood," he said in a phone interview.
Uganda is one of 36 countries in Africa where homosexuality is illegal, and one of eight countries globally where Human Rights Watch has compiled evidence of the use of forced anal examinations to "prove" homosexuality.
Emilian Kayima, a Kampala police spokesman, denied that forced examinations took place.
"We do not need anal examination to prove a person is gay. When we arrest gay people, we take them to the courts of law because what they are engaging in is illegal under the laws of Uganda," Kayima told the Thomson Reuters Foundation.
"If any gay person claims they have been tortured or forced to undergo anal examination, they need to come forward with evidence stating when and where it happened instead of running to the press to make baseless claims," Kayima added.
The Ugandan health ministry declined to answer questions from the Thomson Reuters Foundation.
However, local rights campaigners and Human Rights Watch say Mukasa is one of several victims of forced anal examinations in the east African country. They say while the practice is used ostensibly to prevent the transmission of HIV, it is merely a form of discrimination and abuse.
Uganda lawyer Nicholas Opiyo is preparing a constitutional case to ban forced anal examinations. He believes the HIV and AIDS Prevention and Control Act is used illegally, as an excuse to "prove" homosexuality.
"They are using the law as an excuse to carry out the examinations. We want them banned," he told the Thomson Reuters Foundation from Kampala in a phone interview.
"In all the cases we have dealt with, people are arrested and taken to certain clinics," he said, describing how Mukasa's case was typical.
Like most of sub-Saharan Africa, Uganda is highly religious and socially conservative. Violence against lesbian, gay, bisexual and transgender (LGBT) people is common and politicians have long tried to pass legislation that denies basic rights to the LGBT community.
A law passed more than two years ago, punishing gay sex with long prison terms, provoked an international storm of protest and led some donor countries to withhold aid.
The constitutional court overturned the law - formerly known as the "Kill the Gays" bill because a first draft included the death penalty for gay sex - on a technicality in August 2014.
Cases like Mukasa's are not designed to get LGBT people convicted in court, according to Opiyo. "The examinations aren't used as evidence, they are used as a tool to dehumanize and stigmatize," he said.
Mukasa, who used to work in a restaurant, said police and authorities made no attempt to hide his identity. "I cannot walk the street, I cannot get medicine, I do not have any money and cannot claim benefits because I am a homosexual," he said.
According to experts such examinations have no validity, either legally or medically.
"There is absolutely no value in such examinations for this purpose," Vincent Iacopino, medical director at Physicians for Human Rights, said by phone from the United States.
He said the examinations were unethical, harmful, and in some cases, torture.
Asger Kjaerum, advocacy director at the International Rehabilitation Council for Torture Victims, agreed. "These practices lack both scientific value and violate international standards on the ban of torture and ill-treatment," he said in an email from Copenhagen.
SURGE OF EXAMINATIONS
Homosexuality was banned in Uganda in 1952. In recent years, assaults against LGBT people have been on the rise, according to Human Rights Watch, fueled by the anti-gay policies of President Yoweri Museveni's government.
"Heated discourse around the passage of the Anti-Homosexuality Act and its draconian provisions appears to have led to an increase in harassment of persons perceived to be LGBT by civilians and the police alike," Neela Ghoshal, senior researcher at Human Rights Watch, said in a report this year.
Human rights lawyer Opiyo is currently preparing his case, and expects to file it within the coming months. "Anal examinations are a form of torture, a violation of the Ugandan Constitution, the African Charter, and international human rights. We want them banned," he said.
"If the court declares the practice unconstitutional, the examinations will be unlawful, meaning anyone engaged in performing the examinations could be sued," he said.
Mukasa's case was eventually dismissed due to lack of evidence, but he says he feels convicted, and is serving a sentence – albeit out of jail.
He has changed his identity since the case, and is now living in a shelter, isolated from family and friends.
"I have lost my job because of the case," he said. "People know who I am, I can't leave my house. I cannot get a taxi, I cannot get a job, all because of the case."