This report describes the development of a real-time LightCycler assay for the detection and identification of Candida and Aspergillus spp., using the MagNa Pure LC Instrument for automated extraction of fungal DNA. The assay takes 5–6 h to perform. The oligonucleotide primers and probes used for species identification were derived from the DNA sequences of the 18S rRNA genes of various fungal pathogens. All samples were screened for Aspergillus and Candida to the genus level in the real-time PCR assay. If a sample was Candida-positive, typing to species level was performed using five species-specific probes. The assay detected and identified most of the clinically relevant Aspergillus and Candida spp. with a sensitivity of 2 CFU/mL blood. Amplification was 100% specific for all Aspergillus and Candida spp. tested. To assess clinical applicability, 1650 consecutive samples (1330 blood samples, 295 samples from other body fluids and 25 biopsy samples) from patients with suspected invasive fungal infections were analysed. In total, 114 (6.9%) samples were PCR-positive, 5.3% for Candida and 1.7% for Aspergillus spp. In patients with positive PCR results for Candida and Aspergillus, verification with conventional methods was possible in 83% and 50% of cases, respectively. In conclusion, the real-time PCR assay allows sensitive and specific detection and identification of fungal pathogens in vitro and in vivo.