Mangroves are ecosystems located in tropical and subtropical regions of the world and are vital for coastal protection. Their unique characteristics make them hotspots for carbon cycling and biological diversity. Studies on isolated filamentous fungi and environmental and anthropogenic factors that influence sediments offer new understandings on how to preserve mangroves. Here we report on the filamentous fungi isolated from four mangroves. We correlated fungal community composition with sediment texture, polycyclic aromatic hydrocarbons concentration (oil pollution), pH, salinity, organic matter, total and thermotolerant coliforms (sewage pollution). In total we identified 34 genera and 97 species. The most polluted sites had highest species richness whereas the best preserved site showed the lowest species richness. Oil spill and sewage pollution were identified as the drivers of fungal community composition in the most polluted sites. We found very distinct fungal communities with no >5 species shared between any two mangrove sites.