Objectives: Tuberculosis (TB) remains among the top 10 causes of death globally. A total of 1.23 million people died from TB in 2024. Accurate and timely identification of TB is essential to initiate anti-TB medication promptly. Aim: This study aims to evaluate the diagnostic performance of Ziehl-Neelsen staining and the GeneXpert MTB/RIF assay for detecting Mycobacterium tuberculosis in clinical samples and to analyze the phylogenetic relationships of the gyrA and gyrB genes from a local isolate in Mosul, Iraq, with 15 other global isolates. Methods: 190 sputum and other clinical samples were analyzed using Ziehl-Neelsen staining, GeneXpert assay and PCR detection of gyrA and gyrB genes. Results: Of the 190 tuberculosis-suspected patients, 49 samples tested positive by the GeneXpert method and 43 samples tested positive using Ziehl-Neelsen staining method. Sequence analysis of the gyrA (OQ955242.1) and gyrB (OQ955243.1) genes from the local isolates (Mosul, Iraq) showed limited sequence variation compared with 15 global strains in the NCBI database. Conclusion: GeneXpert MTB/RIF is a highly sensitive and accurate method for detecting Mycobacterium tuberculosis in clinical samples compared with Ziehl-Neelsen staining. gyrA and gyrB genes of the local Mycobacterium tuberculosis isolate are closely related to global strains.