Background Klebsiella species is one of the most worldwide opportunistic pathogens in the world that cause infections at multiple sites like lung, urinary tract, bloodstream, wound or surgical site, and brain. Klebsiella pneumoniae has many types of virulence factors that give the bacteria the ability to invade the host and cause infections. Methods A total of (105) human clinical samples were collected from different patients with different cases. Klebsiella pneumonia were isolated from 30 samples. The bacteria were identified by biochemical tests and certified by using VITEK 2 system and genetically by amplify using PCR for 16 rRNA gene. One of the Klebsiella pneumoniae virulence factors is the capsule that is responsible for the macrophage resistance and its also responsible for serotype. So to confirm the strains isolated, PCR Gene detection of, MagA, K2A, RmpA, and Kfu, where (magA, k2A, rmpA, kfu) gens are responsible for capsule synthesis of Klebsiella pneumonia have been done. Results There were 30 strains of Klebsiella pneumoniae were identified. Epidemiological studies show that infections are preceded by gastrointestinal colonization, with the gastrointestinal tract being the most important reservoir for transmission. The primary bacterial isolates were identified based on their cultural, microscopic, and biochemical traits. The API system (API 20E) and VITEK 2 systems were used to confirm the identity of the bacterial isolates. Colony morphology revealed that Klebsiella pneumonia was Gram-negative, non-motile, microscopic straight rods grouped singly or in pairs. Biochemical tests showed that neutral end products prevailed over acidic end products, with Klebsiella producing negative results for indole. The Kligler Iron Agar (KIA) test showed that Klebsiella isolates changed the color of the slant and butt, producing an acidic slant and acid butt, along with gas production. The urease test for Klebsiella distinguishes between Enterobacter and Klebsiella isolates, as Klebsiella can manufacture the urease enzyme. The indole test distinguishes K. pneumonia from K. pneumonia from K. mobiliz. The API 20E system was used for biochemical testing, and the VITEK 2 system was used for identification. The VITEK 2 system was used to test for biochemical and antibiotic susceptibility, and the results supported the findings from morphological and biochemical analyses. PCR amplification was used for molecular detection, and all nine isolates tested positive for the magA and k2A genes. The ferric iron uptake system gene (kfu) and the extracapsular polysaccharide synthesis regulator gene (rmpA) were amplified using specific primer pairs. The VITEK 2 system demonstrated promising outcomes for K. pneumoniae identification. However, standard diagnostic methods are costly and time-consuming. Conclusions Navigating the complex landscape of infectious diseases, collaborative research projects have become indispensable in unraveling the mysteries surrounding pathogens. The project in Baghdad, having stood as a shining example of such collaboration, provided valuable insights into the identification, characterization, and molecular aspects of Klebsiella pneumoniae strains. The findings, have not only contributed to the scientific community's understanding of bacterial infections but also paved the way for enhanced strategies in diagnosis and treatment.