Introduction: UN global plans on HIV/AIDS have committed to reducing the number of countries with punitive laws criminalizing key populations. This study explores whether punitive laws are associated with countries' performance on targets set in the global plans. Methods: The study used chi-square tests of independence to explore associations between legal status, key population size estimates, and HIV service coverage for 193 countries from 2007 to 2014. We used data reported by countries on United Nations Global AIDS Progress Report (GARPR) indicators, and legal data from UNAIDS, UNDP, and civil society organizations. Due to lack of sufficiently reliable legal data, only men who have sex with men (MSM) could be studied. The study utilized public data aggregated at the national level. Correspondence with individual experts in a subset of countries stated the purpose of the study, and all responses were anonymized. Results and Discussion: A significantly larger proportion of countries that criminalize same-sex sexual behaviour reported implausibly low size estimates or no size estimates for MSM. This is consistent with findings in qualitative research that MSMs are marginalized and reluctant to be studied in countries where same-sex sexuality is criminalized. Size estimates are often used as the denominators for national HIV service coverage reports. Initially, countries that criminalized same-sex sexuality appeared to have higher HIV testing coverage among MSM than did countries where it is not criminalized. However, investigation of a subset of countries that have reported 90-100% HIV testing coverage among MSM found that most were based on implausibly low or absent size estimates. Conclusions: Criminalization of same-sex sexuality is associated with implausibly low or absent MSM size estimates. Low size estimates may contribute to official denial of the existence of MSM; to failure to adequately address their needs; and to inflated HIV service coverage reports that paint a false picture of success. To enable and measure progress in the HIV response, UN agencies should lead a collaborative process to systematically, independently and rigorously gather data on laws and their enforcement.