Organismal interactions within microbial consortia and their responses to harmful intruders remain largely understudied. An important step toward the goal of understanding functional ecological interactions and their evolutionary selection is the study of increasingly complex microbial interaction systems. Here, we discovered a tripartite biosystem consisting of the fungus Aspergillus nidulans, the unicellular green alga Chlamydomonas reinhardtii, and the algicidal bacterium Streptomyces iranensis. Genetic analyses and MALDI-IMS demonstrate that the bacterium secretes the algicidal compound azalomycin F upon contact with C. reinhardtii. In co-culture, A. nidulans attracts the motile alga C. reinhardtii, which becomes embedded and surrounded by fungal mycelium and is shielded from the algicide. The filamentous fungus Sordaria macrospora was susceptible to azalomycin F and failed to protect C. reinhardtii despite chemotactically attracting the alga. Because S. macrospora was susceptible to azalomycin F, this data imply that for protection the fungus needs to be resistant. Formation of the lichen-like association between C. reinhardtii and A. nidulans increased algal growth. The protection depends on the increased amounts of membrane lipids provided by resistant fungi, thereby generating a protective shelter against the bacterial toxin. Our findings reveal a strategy whereby algae survive lethal environmental algicides through cooperation with fungi.