BackgroundWorld Health Organization recommended community-based ART (CBART) approaches to improve access to antiretroviral treatment (ART) and treatment outcomes among key populations living with (KPLHIV). Key populations (KP) are female sex workers, men who have sex with men, persons who inject drugs, and transgender people. How CBART for KP (KP-CBART) worked and why, for whom and in what circumstances it worked within KP communities or at community sites, are yet to be described. The aim of this study is to describe the different KP-CBART approaches or models in Nigeria, identifying the context conditions and mechanisms that are likely to produce the desired outcomes.MethodBuilding on our previous study eliciting an initial programme theory for KP-CBART, we used a multiple case design and cross-case analysis to evaluate 3 KP-CBART approaches, namely: One Stop Shop clinic; community drop-in centre; and outreach venue. Between 2021 and 2023, we conducted a retrospective cohort study, 99 indepth interviews and 5 focused group discussions with various actors. Using realist evaluation, we synthesised context-mechanism-outcome configurations (CMOCs) and developed programme theory for each of the cases and an overall theory.ResultThe analysis showed the central importance of decentralizing ART service delivery to a safe place within the community for KPLHIV. The provision of ART in a KP friendly environment triggered a feeling of safety and trust in the healthcare workers among KPLHIV, resulting in KP-CBART acceptance and improved ART uptake, medication adherence and retention on ART. KP community engagement in ART delivery, peer support through support group meetings, and linkages with KP-led organizations improved self-efficacy, fostered solidarity and a sense of belonging among KP. These resources encouraged and motivated clients to engage with the KP-CBART model. However, fear of disclosure of HIV and KP status, and lack of trust between KP groups, demotivated and discouraged KPLHIV from initiating ART and continuing their treatment in KP-CBART.ConclusionTo optimise access to ART and treatment outcomes for KPLHIV, policy makers and health practitioners should ensure the provision of a safe place for ART service delivery that can be trusted by the clients and the KP communities.