A specific and sensitive polymerase chain reaction (PCR) assay based on the internal transcribed spacer (ITS) region of rDNA sequences was developed to detect endophytic and phytopathogenic fungi from needles of the Japanese black pine, Pinus thunbergii. Sequences of the ITS regions of Lophodermium conigenum, Lecanosticta acicola, Pestalotiopsis neglecta, Rhizosphaera kalkhoffii, and Septorioides pini-thunbergii were compared, and each specific primer pair for these species was designed. First, the designed primer pairs were tested for their specificity to detect each species. A PCR product was amplified only each combination of species and its specific primer pair, confirming the specificity of the designed primer pairs. These primer pairs were also tested on DNA extracted from the needles of P. thunbergii. The PCR products were amplified not only in needles with lesions but also in healthy needles without symptoms. Furthermore, several endophytic and phytopathogenic fungi could be simultaneously detected from the same region in a needle. The PCR-mediated detection method developed in this study will be a valuable tool for the detection of the endophytic and phytopathogenic fungi, not only as a rapid diagnostic tool for early detection but also for monitoring variations in both the quality and quantity of the endophytic and phytopathogenic fungi in needles in Japanese black pines.