Immature fruit fly stages of the family Tephritidae are commonly intercepted on breadfruit from Pacific countries at the New Zealand border but are unable to be identified to the species level using morphological characters. Subsequent molecular identification showed that they belong to Bactrocera xanthodes, which is part of a species complex that includes Bactrocera paraxanthodes, Bactrocera neoxanthodes and an undescribed species. To establish a more reliable molecular identification system for B. xanthodes, a reference database of DNA barcode sequences for the 5’-fragment of COI gene region was constructed for B. xanthodes from Fiji, Samoa and Tonga. To better understand the species complex, B. neoxanthodes from Vanuatu and B. paraxanthodes from New Caledonia were also barcoded. Using the results of this analysis, real-time TaqMan polymerase chain reaction (PCR) assays for the detection of B. xanthodes complex and for the three individual species of the complex were developed and validated. The assay showed high specificity for the target species, with no cross-reaction observed for closely related organisms. Each of the real-time PCR assays is sensitive, detecting the target sequences at concentrations as low as ten copies µl−1 and can be used as either singleplex or multiplex formats. This real-time PCR assay for B. xanthodes has been successfully applied at the borders in New Zealand, leading to the rapid identification of intercepted Tephritidae eggs and larvae. The developed assays will be useful biosecurity tools for rapid detection of species in the B. xanthodes complex worldwide.