"I came out while presenting a keynote address about HIV research at an AIDS conference in Washington DC in 2012. After that I knew I wouldn't be able to go back home," says Paul Semugoma, a 43-year-old gay doctor and HIV researcher.
As a Ugandan, he lived in a country where gay people who dare to have sex may end up behind bars - for life.
"In Uganda, you grow up being told gays are bad," says Semugoma. "You're told they prey on children."
Uganda is a conservative society, where many people have opposed gay rights, and homosexual acts have long been illegal. But the pressure on gay people increased dramatically this February when the country's parliament approved a law - swiftly signed by President Yoweri Museveni - that toughens penalties for gay people.
The law now sets life sentences for gay sex and same-sex marriage, and criminalises anything that can be viewed as promoting homosexuality.
The legislation has been met with outrage in the West, and several countries and international organisations immediately pulled the plug on aid that has been helping Uganda to sustain its economy.
Donors have so far withheld a total of 262 billion Ugandan shillings, or more than US$100 million, according to media reports.
This, some experts say, will mean that the country's scientific research - much of which depends on aid - could face cuts.
As Sebastian Spio-Garbrah, managing director of New York-based DaMina Advisors, a business consultancy that focuses on Africa, says, lack of funding means budget problems for the government and an urgent need to fill gaps.
"It's unlikely that the authorities will want to reduce the defence budget. So the probable outcome are cuts to science and education," says Spio-Garbrah.
And Uganda already has fewer than 900 researchers, some 29 per million citizens, according to UNESCO's Science Report 2010. It invests some 0.3-0.4 per cent of GDP (gross domestic product) in R&D and has been producing between 142 and 354 papers a year from 2000 and 2008, mostly on clinical medicine, biology and biomedicine. There is also a high brain drain rate.
Taking aim at HIV research
Semugoma believes that HIV research will be particularly hard hit, not least as the authorities might interpret such efforts as promotion of homosexuality.
Since coming out more than two years ago, he lives in Johannesburg, South Africa, with his Zimbabwean partner. He says the conditions for gays and lesbians in South Africa are much better than in Uganda, where he previously worked at the International Medical Centre in Kampala as a doctor.
But he is determined to get the story out that HIV research is likely to suffer, and research in general, because of the aid pull out.
"All scientific research in Uganda is dependent on foreign aid," says Semugoma. "I don't know of any research programmes that are not funded by foreign aid." His own HIV research was almost entirely funded from abroad, he adds.
Even with a more conservative assessment, Spio-Garbrah believes that at least 30 per cent of Ugandan research projects have been relying on foreign aid.
And the impact of aid cuts is already apparent. In early March, 87 employees working for a circumcision project lost their jobs, says Kikonyogo Kivumbi, a journalist at the Uganda Health and Science Press Association (UHSPA-Uganda).
"Many research projects that impact on public health, such as national HIV research, are donor-funded, especially from the West," he says. "The cuts in aid will disrupt these important aspects of scientific research into addressing new frontiers to combatting the shifting face of AIDS in Uganda."
The World Bank has postponed a US$90 million loan to improve Uganda's health services until further review "to ensure that its development objectives would not be adversely affected by the enactment of the new law", a World Bank spokesperson tells SciDev.Net.
Science ringfenced by some
Denmark, the Netherlands and Norway were among the first to cut aid. Denmark withheld development aid worth 50 million krone (US$9 million); the Netherlands stopped a €7 million subsidy for Uganda's legal system.
Norway has withheld 50 million Norwegian krone (US$8 million) of its development cooperation with Uganda. But, says Norway's foreign ministry spokesperson, Svein Michelsen, "assistance to Ugandan research institutions will not be affected." Norway is still providing US$55 million for research projects at Ugandan universities.
A similar position has been taken by Sweden, which has also stopped some funding; "Swedish aid is not unconditional," says Hillevi Engström, the country's minister for international development cooperation.
But Sweden has also decided to exempt science funding, because "terminating research support would have significant implications for individuals and lead to negative reactions against LGBT [lesbian, gay, bisexual and transgender] people and organisations," Erik Wirkensjö of Sweden's foreign affairs ministry tells SciDev.Net.
"Research cooperation is different in that it is not directed towards ministerial level but to universities and to individual students and researchers," he adds.
"Support to higher education and to Ugandan participation in international research collaboration is also a powerful means towards promoting critical analysis of societal events and processes of change in Uganda."
Such support also helps strengthen "the agents of change" in Ugandan society. "Researchers at academic institutions are somewhat different from other change-agents. Research not only builds on critical thinking, but also gives citizens and decision-makers better access to knowledge to take well-informed decisions," says Wirkensjö.
"What is particular to the Swedish case is that a new strategy for Uganda is about to be adopted. Our state-to-state aid is frozen until then. Our research funding is based on long-term engagement, and cutting this aid now would mean very high costs to restart the programme, should that be the case."
Edward Tujunirwe, head of corporate and international affairs at the Ugandan National Council for Science and Technology (UNCST), says the situation should not be exaggerated.
"We do not have full information yet on whether this aid cut will affect scientific research or not. As of now, much of the country's research activities are going on smoothly. We don't anticipate any budgetary cuts as a result of a misunderstanding with a few of our development partners," he says.
In any case, he says, the government in Kampala is taking steps to ensure that funding for key government programmes - such as scientific research, education, health, agriculture, security and energy - is not interrupted.
Will Uganda relent?
At this stage, Uganda's Constitutional Court is the only body with the power to declare the anti-gay law unconstitutional, says Adrian Jjuuko, executive director of the Kampala-based Human Rights Awareness and Promotion Forum (HRAPF-Uganda).
"It is beyond the executive or the legislature," he says. "They had their chance - for five long years - and they made the decision to pass the law. It was a deliberate and calculated process. They knew what the repercussions would be, including the cutting of aid that goes to research."
There's not much hope, though, that the court will intervene, and while parliament could overturn the law, that's "frankly not what I expect them to do", says Jjuuko.
Tujunirwe doubts that the law will be withdrawn, but says the government might consider delaying its full implementation.
"After all, for most Ugandans, the practices under the new law have always been outlawed under numerous provisions of various laws, including the Penal Code Act," he says. "What has changed is the extent to which the government is committing itself to implementing those provisions."
And Tujunirwe does not rule out future negotiations with the donors. "The government may in the longer term be prepared to talk to the concerned development partners and iron out the differences," he says - given that the primary recipients of aid are the people of Uganda.
But Jjuuko believes that the government cares little about research. Scientists "are seen as elitist, and I have a firm belief that no money will be shifted from other budget lines to research - it will simply be dropped", he says.
Semugoma agrees: "In Uganda, research is simply completely off the radar."
His future remains uncertain. He would love to go back to Uganda, but knows that - at least in the short term - that is impossible because he would fear arrest and even death.
And he says he may not be the only researcher leaving Uganda after the anti-gay law. Others may follow, and probably already have.
Uganda's controversial legislation might increase the scientific brain drain, with long-lasting negative consequences for the country, concludes Semugoma.