Many wastewater treatment plants around the world suffer from the operational problem of foaming. This is characterized by a persistent stable foam that forms on the aeration basin, which reduces effluent quality. The foam is often stabilized by a highly hydrophobic group of Actinobacteria known as the Mycolata1. Gordonia amarae is one of the most frequently reported foaming members1. With no currently reliable method for treating foams, phage biocontrol has been suggested as an attractive treatment strategy2. Phages isolated from related foaming bacteria can destabilize foams at the laboratory scale3,4; however, no phage has been isolated that lyses G. amarae. Here, we assemble the complete genomes of G. amarae and a previously undescribed species, Gordonia pseudoamarae, to examine mechanisms that encourage stable foam production. We show that both of these species are recalcitrant to phage infection via a number of antiviral mechanisms including restriction, CRISPR-Cas and bacteriophage exclusion. Instead, we isolate and cocultivate an environmental ultrasmall epiparasitic bacterium from the phylum Saccharibacteria that lyses G. amarae and G. pseudoamarae and several other Mycolata commonly associated with wastewater foams. The application of this parasitic bacterium, 'Candidatus Mycosynbacter amalyticus', may represent a promising strategy for the biocontrol of bacteria responsible for stabilizing wastewater foams.