Estuarine salinity gradients are known to influence plant, bacterial and archaeal community structure. We sequenced 18S rRNA genes to investigate patterns in sediment fungal diversity (richness and evenness of taxa) and composition (taxonomic and phylogenetic) along an estuarine salinity gradient. We sampled three marshes-a salt, brackish and freshwater marsh-in Rhode Island. To compare the relative effect of the salinity gradient with that of plants, we sampled fungi in plots with Spartina patens and in plots from which plants were removed 2 years prior to sampling. The fungal sediment community was unique compared with previously sampled fungal communities; we detected more Ascomycota (78%), fewer Basidiomycota (6%) and more fungi from basal lineages (16%) (Chytridiomycota, Glomeromycota and four additional groups) than typically found in soil. Across marshes, fungal composition changed substantially, whereas fungal diversity differed only at the finest level of genetic resolution, and was highest in the intermediate, brackish marsh. In contrast, the presence of plants had a highly significant effect on fungal diversity at all levels of genetic resolution, but less of an effect on fungal composition. These results suggest that salinity (or other covarying parameters) selects for a distinctive fungal composition, and plants provide additional niches upon which taxa within these communities can specialize and coexist. Given the number of sequences from basal fungal lineages, the study also suggests that further sampling of estuarine sediments may help in understanding early fungal evolution.