Sacred groves (SGs) of India are islets of forests providing ecosystem and spiritual services to man. Studies suggest that SGs are deteriorating on their quality due to urbanization, invasive species, land-use change, and religious modernization. We explored diversity, community, and abundance of overall and different functional groups of litter ants, including Anoplolepis gracilipes – an invasive ant – on paired SG-neighbouring home garden (HG) sites in rural and urban landscape to (a) assess the quality of SGs and (b) examine whether the variation in ant community of the two habitats was predicted by urbanization and abundance of A. gracilipes. We considered species and local contribution to β-diversity to identify species and sites crucial for conservation of sites. Abundance and richness of overall ants, proportional trap incidence of species, and abundance of A. gracilipes were similar on SG and HG, but species diversity and abundance of certain ant functional groups were higher on SG. Ant community of SG was different from HG, but was not affected by urbanization. A. gracilipes and rural SGs contributed the most to β diversity. A. gracilipes gave little pressure on native ant community. The study concludes that SGs, despite invaded by A. gracilipes, have potential for conserving biodiversity.