Cystic fibrosis (CF) is a commonly inherited fatal disease in European descendants that is caused by defects in the CFTR gene. The excessive production of mucus produced by this defect, coupled with a typically exaggerated and ineffective immune response, provides optimal growth conditions for airway infections of various opportunistic pathogens with high antibiotic tolerance including Pseudomonas aeruginosa, Burkholderia cepacia species, Staphylococcus aureus, Achromobacter xylosoxidans, and Stenotrophomonas maltophilia. In addition to its contributory role in CF pathogenesis, S. maltophilia is increasing in prevalence in other clinical settings, including bloodstream, wound and catheter-associated infections. Currently, there is no rapid and highly-accurate method for detecting this naturally multi-drug resistant and potentially life-threatening opportunistic pathogen, suggesting that its true prevalence is likely being underestimated. This study used large-scale comparative genomics of S. maltophilia and near-neighbour species to identify a specific genetic target for this emerging pathogen, with subsequent development and validation of a newly designed real-time Black Hole Quencher-based PCR assay for its detection. Comparative genomic analysis of publicly available Stenotrophomonas spp. genomes identified a single 4kb region that was specific to S. maltophilia. Microbes BLAST analysis of non-S. maltophilia matches to the PCR amplicon revealed several isolates submitted to GenBank that we confirmed as S. maltophilia using phylogenomic analysis, thereby representing species assignment errors in the NCBI database. Upon PCR assay optimisation, we incorporated our assay with a previously published universal 16S rDNA target to enable the simultaneous identification of S. maltophilia and confirmation of DNA integrity. Our assay successfully detected 89 clinical S. maltophilia samples derived from both CF sputa and acute non-CF infections with 100% accuracy. Our novel assay surpasses existing phenotypic and genotypic methods for the identification of this organism, and will improve the diagnosis and subsequent treatment of this under-recognised pathogen by enabling its accurate detection from polymicrobial clinical and environmental samples.