Anaerobic fungi from the herbivore digestive tract (Neocallimastigomycetes) are primary lignocellulose modifiers and hold promise for biotechnological applications. Their molecular detection is currently difficult due to the non-specificity of published primer pairs, which impairs evolutionary and ecological research with environmental samples. We developed and validated a Neocallimastigomycetes-specific PCR primer pair targeting the D2 region of the ribosomal large subunit suitable for screening, quantifying, and sequencing. We evaluated this primer pair in silico on sequences from all known genera, in vitro with pure cultures covering 16 of the 20 known genera, and on environmental samples with highly diverse microbiomes. The amplified region allowed phylogenetic differentiation of all known genera and most species. The amplicon is about 350 bp long, suitable for short-read high-throughput sequencing as well as qPCR assays. Sequencing of herbivore fecal samples verified the specificity of the primer pair and recovered highly diverse and so far unknown anaerobic gut fungal taxa. As the chosen barcoding region can be easily aligned and is taxonomically informative, the sequences can be used for classification and phylogenetic inferences. Several new Neocallimastigomycetes clades were obtained, some of which represent putative novel lineages such as a clade from feces of the rodent Dolichotis patagonum (mara).