BACKGROUND:Viruses directly affect the most important biological processes in the ocean via their regulation of prokaryotic and eukaryotic populations. Marine sponges form stable symbiotic partnerships with a wide diversity of microorganisms and this high symbiont complexity makes them an ideal model for studying viral ecology. Here, we used morphological and molecular approaches to illuminate the diversity and function of viruses inhabiting nine sponge species from the Great Barrier Reef and seven from the Red Sea. RESULTS:Viromic sequencing revealed host-specific and site-specific patterns in the viral assemblages, with all sponge species dominated by the bacteriophage order Caudovirales but also containing variable representation from the nucleocytoplasmic large DNA virus families Mimiviridae, Marseilleviridae, Phycodnaviridae, Ascoviridae, Iridoviridae, Asfarviridae and Poxviridae. Whilst core viral functions related to replication, infection and structure were largely consistent across the sponge viromes, functional profiles varied significantly between species and sites largely due to differential representation of putative auxiliary metabolic genes (AMGs) and accessory genes, including those associated with herbicide resistance, heavy metal resistance and nylon degradation. Furthermore, putative AMGs varied with the composition and abundance of the sponge-associated microbiome. For instance, genes associated with antimicrobial activity were enriched in low microbial abundance sponges, genes associated with nitrogen metabolism were enriched in high microbial abundance sponges and genes related to cellulose biosynthesis were enriched in species that host photosynthetic symbionts. CONCLUSIONS:Our results highlight the diverse functional roles that viruses can play in marine sponges and are consistent with our current understanding of sponge ecology. Differential representation of putative viral AMGs and accessory genes across sponge species illustrate the diverse suite of beneficial roles viruses can play in the functional ecology of these complex reef holobionts. Video Abstract.