Conservation of South Africa's butterflies is critically dependent on knowledge of their ecology. Many endangered species are in the family Lycaenidae and have a more-or-less obligate relationship with a particular species of ant. An ecosystem capable of hosting such butterfly species must also be able to sustain substantial populations of the host ant. The Brenton blue, Orachrysops niobe, is one of the most endangered South African butterflies, and is known only from one site in the Western Cape. Ant assemblages were investigated at this site and two other ecologically similar sites where the host plant of O. niobe, Indigofera erecta, also occurs, but O. niobe was absent. The ant assemblages differed significantly, with the host ant of O. niobe, Camponotus baynei, only occurring at the Brenton site where the butterfly was breeding. Vegetation composition, structure and microclimate differed at the three sites and these appear to be key factors in determining the ant assemblages that a site will support. The two sites where C. baynei was absent had a history of recent fire, which contributed to the vegetation changes and deprived the ant of dead wood for nesting. The invasive Argentine ant, Linepithema humile, was not detected at any of the study sites, and the reasons for this are discussed.