Infectious diseases result from multiple interactions among microbes and hosts, but community ecology approaches are rarely applied. Manipulation of vector populations provides a unique opportunity to test the importance of vectors in infection cycles while also observing changes in pathogen community diversity and species interactions. Yet for many vector-borne infections in wildlife, a biological vector has not been experimentally verified, and few manipulative studies have been performed. Using a captive colony of fruit bats in Ghana, we conducted the first study to experimentally test the role of bat flies as vectors of Bartonella species. We observed changes in the Bartonella bacteria community over time following the decline of bat flies and again after their subsequent restocking. Reduced transmission rates led to microbial community changes attributed to ecological drift and potential species sorting through interspecific competition mediated by host immunity. We demonstrate that forces maintaining diversity in communities of free-living macroorganisms act in similar ways in communities of symbiotic microorganisms, both within and among hosts.