Article Text

Association of same-sex criminalisation laws and national HIV policies with HIV testing in African MSM: an ecological single-level and multilevel cross-sectional study of sub-Saharan African countries
  1. Ngozi Kalu1,
  2. Michael W Ross2,
  3. Miriam Taegtmeyer3,
  4. Erik Lamontagne4,
  5. Sean Howell5,
  6. Melissa Neuman6
  1. 1Department of Infectious Disease Epidemiology, London School of Hygiene & Tropical Medicine, London, UK
  2. 2Department of Family Medicine and Community Health, University of Minnesota Medical School, Minneapolis, Minnesota, USA
  3. 3Department of International Public Health, Liverpool School of Tropical Medicine, Liverpool, UK
  4. 4UNAIDS, Geneve, Switzerland
  5. 5LGBT+ Foundation, San Francisco, California, USA
  6. 6MRC International Statistics and Epidemiology Group and Department of Infectious Disease Epidemiology, London School of Hygiene and Tropical Medicine, London, UK
  1. Correspondence to Dr Melissa Neuman, Department of Infectious Disease Epidemiology, London School of Hygiene & Tropical Medicine, London, WC1E 7HT, UK; Melissa.Neuman{at}


Background HIV incidence among men who have sex with men (MSM) in sub-Saharan Africa (SSA) remains high compared with the general population. Many countries in the region still criminalise consensual homosexual relationships, and some are yet to adopt WHO-recommended interventions for MSM into national HIV policies. This study examines how HIV testing of adult MSM in SSA varies according to the legal climate and presence of targeted HIV policy using data from the cross-sectional 2019 Global LGBTI Internet Survey study.

Methods Using data from 3191 MSM in 44 SSA countries, we assessed associations of legal climate and HIV policy with ever and recent HIV testing using linear ecological and logistic multilevel analyses. From the single-level analysis, we can compare our findings to previously reported data, then, extending to a two-level multilevel analysis, we account for the hierarchical structure of the population and simultaneously adjust for differences in context and composition in each country. We then test the sensitivity of our analyses to excluding countries from the model.

Results We find evidence that legalised same-sex relationships were associated with increased odds of ever testing (OR=2.00, 95% CI 1.04, 3.82) in multilevel analyses. We also find evidence of an association of targeted HIV policies with increased odds of ever testing (OR=2.49, 95% CI 1.12, 5.52). We did not find evidence of an association of the legal climate (OR=1.01, 95% CI 0.69, 1.46) and targeted HIV policies (OR=1.26, 95% CI 0.78, 2.04) with recent testing.

Conclusions This study suggests elimination of discriminatory laws and policies might be important for increasing HIV status awareness of MSM, an important first step in epidemic control. Additionally, we highlight heterogeneity between South Africa and other SSA countries, which has implications for studying SSA countries as a homogeneous group.

  • HIV testing
  • homosexuality, male
  • africa

Data availability statement

Data are available upon reasonable request. Data may be available from the corresponding author upon reasonable request.

This is an open access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited, appropriate credit is given, any changes made indicated, and the use is non-commercial. See:

Statistics from

Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.


  • Evidence from a recent study across 10 countries in sub-Saharan Africa (SSA) suggests that men who have sex with men (MSM) living in countries that criminalise same-sex relationships have the highest HIV prevalence.


  • An enabling legal and policy environments appear to be important structural factors in shaping the ability for MSM to initially engage with testing services in SSA.

  • For recent testing, the existence of these discriminatory laws and policies no longer appears important, rather social experiences of homophobia-related stigma (eg, at health facilities) and individual-level dimensions of stress processes could be influencing the decision to return for services.


  • There is a need for deliberate and focused policy and conducive legal environments if MSM are to openly test and get tailored support and prevention.

  • Future research looking at the possible mediating effects of health facility-level predictors on these contextual effects to recent testing behaviours of SSA MSM is needed.


There were 1.5 million new HIV infections reported globally in 2021 and 58% of these were in sub-Saharan Africa (SSA).1 Across SSA, HIV prevalence among men who have sex with men (MSM) was five times greater than its prevalence in men in the general population.2 In 2012, The Lancet published a series on MSM highlighting the inequalities in the global response to AIDS, especially the lack of empirical data on MSM in the African region.3 A decade on, due to difficulties in reaching this hidden population, there is still little known on how structural factors affect MSM access to HIV services.

Structural, social, healthcare-related and individual-level factors all prevent HIV interventions reaching MSM.4 5 A structural factor of particular concern is criminalisation of same-sex relationships within the region .6 Currently, 26 SSA countries have laws criminalising homosexual acts with penalisation ranging from a fine to death.7 Legal discrimination is a component of stigma, a social process where individuals with certain characteristics are seen as having less social value than others and, consequently, can result in non-explicit forms of structural discrimination.8 An example includes the exclusion of MSM in national HIV control policies irrespective of same-sex criminalisation, leading to further barriers to HIV services.8 9 Historically, MSM have not received adequate priority in national strategic HIV policies in SSA: this is especially true of countries with generalised epidemics.10 This hinders progress in controlling the epidemic.9 The WHO developed consolidated guidelines in 2014 (updated in 2016) for HIV prevention and treatment for key populations (KPs), including MSM, to guide countries in planning and developing effective and acceptable programmes, but its adoption has been slow in the region.11

In many SSA countries, only a small per cent of gross domestic product (GDP) is spent on health.12 In most cases, the available resources are channelled to HIV surveillance and programming for the general population, further widening the disparities in HIV prevalence between the general population and KPs.13 Consequently, SSA countries rely heavily on donor funding to support programmes for MSM, notably the US President’s Emergency Plan for AIDS Relief (PEPFAR), which has supported programming through non-governmental organisations in many of their focus countries.14

Available data from the region on criminalisation of same-sex relationships and MSM engagement with HIV programmes are derived from pooled estimates.5 To our knowledge, none have assessed the associations of targeted HIV policies with uptake of HIV services for MSM in the region. With very few countries in the region on track to meet the 2030 target of 95% of people living with HIV aware of their status, there is an urgent need to use empirical data to understand the role of structural factors in preventing MSM from accessing HIV services.

We use data from the 2019 Global LGBTI Internet Survey to examine the associations of legal climate, defined as whether or not consensual same-sex sexual acts are criminalised, and the presence or absence of targeted HIV policy with HIV testing by SSA MSM.


We report our findings according to the recommendations of the Strengthening the Reporting of Observational Studies in Epidemiology guidance.

Study design and setting

We conducted a secondary analysis of data collected from the 2019 Global LGBTI Internet Survey.15 The study was a combined project of the Joint United Nations Programme on HIV/AIDS (UNAIDS), the LGBT Foundation, the University of Aix-Marseille and the Medical School of the University of Minnesota. Adult (over age 18) lesbian, gay, bisexual, transgender and intersex (LGBTI) participants were recruited for the survey through their social networks, national and regional LGBTI or human rights community networks, advocates and celebrities. Facebook, Instagram, Twitter, WeChat, Weibo and WhatsApp advertisements promoted the study and UNAIDS country teams created the visibility of the study. Facebook was the main promotion platform for countries without LGBTI dating apps. The questionnaire was disseminated online from May to December 2019 without geographical restrictions in 32 languages. Participation was voluntary and no incentives were given. Participants accessed the online anonymous survey on SurveyMonkey via an encrypted connection link. Participants who did not provide consent, were under age 18 (or did not provide a numerical value for age) and those not self-identifying as LGBTQI were excluded from the analysis.

Overall, data were collected from 46 SSA countries, and in this secondary analysis we included data from 44 SSA countries (there were no eligible MSM responses in the two countries excluded). Our inclusion criteria for individuals were self-identified HIV-negative MSM/don’t know/don’t want to answer, born male; gay/bisexual/unsure; and living in countries with available national HIV policy documents covering the survey time frame.

Theoretical frameworks

Elements from Krieger’s ecosocial theory of disease distribution and Meyer’s minority stress model were used to guide and frame the study methods (online supplemental appendix figure 1).8 16 The ecosocial theory considers the pathways that lead to embodiment of exposures arising from the social and ecological contexts and expressed in population patterns of health using multilevel measures of exposure from both life course and historical generation. Krieger suggests considerations of exposures to structural and individual factors through measures of explicit, non-explicit and implicit laws, policies and rules. The minority stress model conceptualises individual stress-coping mechanisms of minority groups in response to chronic negative social experiences. We used this to identify individual-level covariates in the multilevel analysis. The combination of both models accounts for the intersections of multiple identities at the micro level (eg, sexual orientation, minority characteristics, socioeconomic status) and macro level (eg, discriminatory laws and policies) to produce inequalities in exposure and vulnerability to HIV.



Two self-reported HIV testing outcomes were used: ever tested for HIV, and recently tested in the past 6 months (from those who reported ever testing).

Country-level variables

We included five country-level variables: legal climate, targeted HIV policy, epidemic type, PEPFAR funding and log GDP expenditure on health. Legal climate was measured as whether same-sex relationships were legal or illegal in 2019 using the legal classification reported in the ILGA World report.17 Targeted HIV policy was measured as none, partial or full inclusion of the WHO-recommended interventions for MSM in the most recent national HIV policies (online supplemental appendix table 1). For countries where national HIV policy documents covering 2019/2020 were unattainable, an earlier policy was used with a cut-off date of no earlier than 2014. Countries where we could not access national HIV policies, we grouped as having ‘none’. Percentage GDP expenditure on health (in 2018, logged), as reported by the World Bank, was included as a continuous measure.12 Type of HIV epidemic was operationalised as countries with HIV prevalence of >1% as reported by UNAIDS in 2019 classed as having a generalised epidemic and <1% as generalised or concentrated.18 Countries with PEPFAR funding were classified based on their funding in 2019 and excluding regional programmes.14

Individual-level variables

Demographic, socioeconomic and geographical explanatory variables collected in the survey were used as covariates in the multilevel models (online supplemental appendix table 1). These included: age; education; relationship status; size of settlement; and economic hardship used as a subjective assessment of income status by measuring self-reports of economic pressure of respondents. The higher the score, the lower the economic pressure and therefore presumed higher income.

Statistical methods

We applied single-level linear regression to study the associations of legal climate and targeted HIV policies with continuous measures of ever tested and HIV testing in the past 6 months for MSM groups. Single-level analyses give equal weight to countries and these findings allow the comparison of our findings to those previously reported by other researchers. We then extended the analysis to two-level multilevel logistic regression models to account for the hierarchical structure of our data to determine if any observed associations still hold true after accounting for individual-level explanatory variables (online supplemental appendix 2).19 We used complete case analyses as missing data were <6% overall.

Sensitivity analyses

We know the dataset is dominated by a few large countries: South Africa (SA) 568 (20%); Democratic Republic of Congo 181 (6%); and Nigeria 165 (6%), and we also know at least one of these countries is quite different from the others, with more legislative protection for same-sex couples (online supplemental appendix tables 2 and 3 for additional details).17 Additionally, we had missing data for our main exposure variable that we made assumptions about, such as the assumption that the six countries we could not access HIV policy documents for will not have any targeted interventions for MSM. We conducted three sensitivity analyses: (1) excluding each country one at a time from the model; (2) removing responses from MSM who did not want to provide an answer for their HIV status; and (3) analysis omitting countries with no HIV policy documents available.

Patient and public involvement

Patients and the public were not involved.



Forty-four SSA countries and 3746 MSM were potentially eligible. After applying the eligibility criteria, 44 countries and 3191 participants were retained (online supplemental appendix figure 2).

Descriptive analysis

Overall, 2744/3191 (86.0%) MSM in the study reported ever testing and 1819/2744 (66.3%) of these indicated recent testing in the 6 months prior to the survey (online supplemental appendix figure 3). Table 1 shows the proportion of MSM ever and recently testing with country-level covariates.

Table 1

Percentage HIV ever tested and recently tested by legal climate and availability of WHO-recommended targeted interventions

Table 2 describes the bivariate distribution of ever and recently tested by key explanatory variables in the analytical sample. The median age category of the sample was 25–34 (44.1%). The responding MSM primarily self-identified as gay, 2223 (71.2%); a quarter were bisexual, 761 (24.4%); and the remaining 140 (4.5%) were unsure of their sexual orientation. A small proportion of respondents had primary education or less, 213 (6.8%); secondary education 1268 (40.2%); university first degree 1233 (39.1%); and 439 (13.9%) had postgraduate degrees. Most of the respondents were geographically located in major cities, 1897 (60.2%); with 987 (31.3%) in medium or small size cities, and 269 (8.5%) living in villages or farms.

Table 2

Study characteristics by HIV testing outcomes (n=44 countries)

Of the 44 SSA countries included, same-sex relationships were legal in 19 (45.1%), 32 (72.7%) had partially included targeted interventions for MSM in their national HIV policies (online supplemental appendix table 3), 12 (27.3%) met the first 90 target (2020 target of 90% of people living with HIV aware of their status) (online supplemental appendix figure 4), 31 (70.5%) had generalised HIV epidemics and 23 (52.3%) were PEPFAR countries (online supplemental appendix figure 5). Of countries that did not provide any intervention for MSM (including countries we could not get HIV policy data for), 6 (50.0%) criminalise same-sex relationships, one of which Eritrea and Mauritania have concentrated epidemics and no PEPFAR support.

Review of national HIV policies

Of the 32 HIV policy documents that provided targeted MSM interventions, none included all the WHO-recommended interventions for MSM (online supplemental appendix table 3). All countries that provided interventions for MSM included condom provision, but only 23 (71.9%) provided accompanying condom-compatible lubricants. Only 19 (59.4%) included community-based counselling and testing or provider-initiated counselling and testing. Harm reduction interventions were the least provided interventions, 8 (25.0%).

Ecological single-level analysis

Ever HIV tested

Non-criminalisation of same-sex relationships (b=6.13, 95% CI 5.33, 6.93) showed strong evidence of a positive association with ever HIV tested in the univariable model (online supplemental appendix table 4), with MSM in legal climates having a 6.1% increase in ever testing than MSM in countries where same-sex relationships are illegal. There was also a very strong positive association of targeted HIV policy (b=14.13, 95% CI 13.17, 15.1) with ever HIV tested, with a 14.1% increase in ever testing by MSM in countries that provide targeted HIV interventions compared with MSM in countries that do not provide targeted HIV interventions.

HIV tested in the past 6 months

There was very strong evidence of a positive association of legalised same-sex relationships (b=3.23, 95% CI 2.05, 4.40) with recent testing. Targeted HIV policy (b=−0.02, 95% CI −0.93, 0.88) showed no evidence of a positive association with recent testing in the univariable model (online supplemental appendix table 4).

Multilevel analysis

Ever HIV tested

Legal climate and targeted HIV policy were associated with ever testing for HIV (table 3). As in the ecological analysis, participants were more likely to have tested in countries where homosexuality is legal (OR=2.00, 95% CI 1.04, 3.82) and with targeted HIV policy (OR=2.49, 95% CI 1.12, 5.52). This was especially so for MSM in all age categories, self-identified as bisexual, are in a relationship with a man and have above secondary education. The variance partition coefficient (VPC) change from model 1 (27.1%) to model 2 (14.6%) suggests country-level variables accounted for almost half of the variability in ever testing between countries.

Table 3

Multilevel logistic regression OR and 95% CI for ever HIV testing in 44 SSA counties

HIV tested in the past 6 months

There was no evidence of an association of the legal climate (OR=1.01, 95% CI 0.69, 1.46) and the presence of targeted HIV policy (OR=1.26, 95% CI 0.78, 2.04) with recent testing (model 2, table 4). After country-level and individual-level variables were added, again, VPC change (8.0% to 5.0%) suggests country-level variables accounted for almost half of the variability in recent testing between countries.

Table 4

Multilevel logistic regression OR and 95% CI for HIV testing in the past 6 months in 44 SSA counties

Sensitivity analyses

We performed a number of sensitivity analyses to test the robustness of our findings. The strength and direction of associations differed when SA was removed. There were less marked changes when other countries were removed (online supplemental appendix tables 6–21).


These findings show strong evidence that countries in SSA with legalised same-sex relationships and targeted national HIV policy for MSM had higher prevalence of ever testing, and individual MSM in these countries report increased odds of testing.

An enabling legal and policy environments appear to be important structural factors in shaping the ability of MSM to initially engage with testing services in SSA. While for recent testing, the existence of these discriminatory laws and policies no longer appears important, rather social experiences of homophobia-related stigma (eg, at health facilities) and individual-level dimensions of stress processes could be influencing decision to return for services. In the findings of a recent scoping review, the removal of punitive laws and policies was evidenced as important societal enablers to increase the effectiveness of HIV services as a first step in a continuum of other enabling processes.20 Complex socioeconomic factors at the individual level, such as low educational attainment and poverty, are also attributable to the disparities in HIV vulnerabilities in MSM, although this can be to a lesser magnitude to the effects of the legal climate.21 Intersectional stigma has been shown to operate at the community level in addition to structural and individual levels and has been reported to influence anticipated/experienced stigma and discrimination at health facilities by MSM.22 Consistent with our findings are reports from several studies of African MSM in hostile environments who had never tested, who indicated avoiding accessing healthcare services due to fear of potential discovery of their sexual orientation, arrest or conviction.23 24 Similarly, studies have reported increased utilisation of HIV prevention in settings that invest in providing targeted services for MSM.25 It is perhaps plausible that better ever testing outcomes in less hostile countries are as a result of targeted community and health facility-based services, founded on human rights-based approaches, often delivered by trained healthcare professionals or peer-led services that are often difficult to establish in hostile environments.26

A larger proportion of the MSM in our study reported being ever (87.6%) and recently tested (66.4%) for HIV compared with findings from a 2019 systematic review and meta-analysis of SSA MSM.5 Our findings could be due to over-representation of MSM from medium/large cities and from higher socioeconomic backgrounds attributable to recruitment through LGBTI social/community networks and administration of the survey through the internet.27 Additionally, some of the criminal laws in SSA specifically prevent registration/operation of LGBTI social/community networks, further limiting the population reach of the sampling methods.7 We also have broader representation from all parts of the continent, while the review had over-representation of studies from east and southern African counties. Also, by 2018, eleven of the SSA countries in our study had implemented HIV self-testing (HIVST) policies, 11 more had supportive HIVST policies that were not yet implemented and the remaining were under development.28 Despite increased overall ever testing, we still report lower ever testing (85.3%) in hostile environments compared with countries that do not criminalise homosexuality (91.1%).

We found SA was quite distinct from other SSA countries, like findings by the previous review using pooled proportions.5 From our multilevel models, we found SA has substantially more variability compared with the other SSA countries in the analyses. Introducing the country and individual effects for both ever and recently tested, the VPC reduced by 46% and 38% (67% and 38% excluding SA), respectively. Several factors make SA unique. It is the only African country with constitutional protection against discrimination based on sexual orientation, permits same-sex marriage, has partnership recognition for same-sex couples and allows joint/second parent adoption.17 Also, racial diversity and the history of apartheid in SA has epidemiological and historical implications.8 29 Higher HIV prevalence is reported among black MSM, who are more likely to be from lower socioeconomic backgrounds, less educated, live in rural areas and have less access to health services compared with non-black MSM.29 The mechanisms of intersectional stigma are therefore different for different groups of MSM in this context, resulting in different HIV testing barriers. The original survey did not collect data on participant’s race, so we were unable to account for this in our analyses.

While every effort was made to reduce bias, caution should be used in interpreting the results of this study as causal effects. An important limitation is selection bias. Participants were recruited through LGBTI social/community networks, and survey was administered through the internet. Internet sampling strategies are likely to lead to geographically constrained samples with higher responses from participants likely to be younger, from urban areas, better educated and more likely to be students.27 Some of the criminal laws in SSA specifically prevent the registration/operation of LGBTI social/community networks, leading to additional bias.7 This could mean that our study findings may underestimate the effect of the legal climate on MSM HIV testing. Self-selection bias is likely to have added to the systematic differences observed in the study participants and could explain the higher proportion ever and recently tested in our study compared with those reported in other studies within the region.

The generalisability of the findings could be limited by small sample sizes within countries (online supplemental appendix table 2), the over-representation of MSM from medium/large cities and from higher socioeconomic backgrounds. There are limitations in assessing directionality or measuring any temporal links between the exposures and outcomes using survey data. Additionally, temporality and changing policies have implications on the measure of ever testing.

There is limited pool of available studies on SSA MSM and testing using confidential interview methods to reduce reporting bias.5 Internet-based surveys offer advantages of reaching previously understudied and hidden populations, while also providing improved confidentiality for respondents, especially in hostile environments.30 To our knowledge, this study is the first to use identical methods to collect data from a large sample of SSA countries. Furthermore, our study includes the comprehensive review of national HIV policies of all 44 SSA countries for the inclusion of the WHO-recommended interventions for MSM, which has been used to assess the relationship between availability of these targeted interventions and access by the intended population in our study.


Our study shows that hostile legal and policy environments might contribute to lower HIV testing rates by MSM across SSA. We also find that the SSA populations are quite distinct, which has methodological implications for studying the effects of country-level context on health behavioural outcomes of SSA MSM. Future research should conceptualise specific pathways through which the complex contextual and compositional factors at play in SA influence MSM engagement with HIV control programming. Although not routinely practised, collecting data on the race of study participants in African countries that are racially diverse could facilitate greater understanding of the data.

Data availability statement

Data are available upon reasonable request. Data may be available from the corresponding author upon reasonable request.

Ethics statements

Patient consent for publication

Ethics approval

Ethics approval was granted for the primary data study by the Research Ethics Committee of Aix-Marseille University in March 2019 (ref: 2019-14-004) and by the WHO Research Ethics Review Committee in April 2019. Ethical approval for the secondary use of the data for this study was obtained from the primary data owners, and further approval was received from the London School of Hygiene & Tropical Medicine (LSHTM) Ethics Committee (ref: 26340). Participants gave informed consent to participate in the study before taking part.


Supplementary materials

  • Supplementary Data

    This web only file has been produced by the BMJ Publishing Group from an electronic file supplied by the author(s) and has not been edited for content.


  • Handling editor Adam Huw Bourne

  • Twitter @lamontagne_erik, @melneuman

  • Contributors NK: conceptualisation, formal analysis, methodology, writing—original draft. EL and SH: data collection and investigation, EL and

    and MWR: data interpretation. MN: data validation. MN, MWR and MT critically reviewed and commented on the drafts and approved the final version of the manuscript. NK is guarantor. All authors approved the final version.

  • Funding MN is supported by the International Statistics and Epidemiology Group, which is jointly funded by the UK Medical Research Council (MRC) and the UK Foreign Commonwealth and Development Office (FCDO) under the MRC/FCDO Concordat agreement and is also part of the EDCTP2 programme supported by the European Union (grant ref: MR/R010161/1).

  • Map disclaimer The inclusion of any map (including the depiction of any boundaries therein), or of any geographical or locational reference, does not imply the expression of any opinion whatsoever on the part of BMJ concerning the legal status of any country, territory, jurisdiction or area or of its authorities. Any such expression remains solely that of the relevant source and is not endorsed by BMJ. Maps are provided without any warranty of any kind, either express or implied.

  • Competing interests None declared.

  • Provenance and peer review Not commissioned; externally peer reviewed.

  • Supplemental material This content has been supplied by the author(s). It has not been vetted by BMJ Publishing Group Limited (BMJ) and may not have been peer-reviewed. Any opinions or recommendations discussed are solely those of the author(s) and are not endorsed by BMJ. BMJ disclaims all liability and responsibility arising from any reliance placed on the content. Where the content includes any translated material, BMJ does not warrant the accuracy and reliability of the translations (including but not limited to local regulations, clinical guidelines, terminology, drug names and drug dosages), and is not responsible for any error and/or omissions arising from translation and adaptation or otherwise.