The objective of this study was to develop and evaluate newly improved, rapid, and reliable strategies based on real-time PCR to detect the most frequent beta-lactamase genes recorded in clinical Enterobacterales strains, particularly in Tunisia (blaSHV12, blaTEM, blaCTX-M-15, blaCTX-M-9, blaCMY-2, blaOXA-48, blaNDM-1, and blaIMP) directly from the urine. Following the design of primers for a specific gene pool and their validation, a series of real-time PCR reactions were performed to detect these genes in 78 urine samples showing high antibiotic resistance after culture and susceptibility testing. Assays were applied to DNA extracted from cultured bacteria and collected urine. qPCR results were compared for phenotypic sensitivity. qPCR results were similar regardless of whether cultures or urine were collected, with 100% sensitivity and specificity. Out of 78 multiresistant uropathogenic, strains of Enterobacterales (44 E. coli and 34 K. pneumoniae strains) show the presence of the genes of the bla group. In all, 44% E. coli and 36 of K. pneumoniae clinical strains harbored the bla group genes with 36.4%, 52.3%, 70.5%, 68.2%, 18.2%, and 4.5% of E. coli having blaSHV-12, blaTEM, blaCTX-M 15, blaCTX-M-9, blaCMY-2, and blaOXA-48 group genes, respectively, whereas 52.9%, 67.6%, 76.5%, 35.5%, 61.8, 14.7, and 1.28% of K. pneumoniae had blaSHV-12, blaTEM, blaCTX-M 15, blaCTX-M-9, blaCMY-2, blaOXA-48, and blaNDM-1 group genes, respectively. The time required to have a result was 3 hours by real-time PCR and 2 to 3 days by the conventional method. Resistance genes of Gram-negative bacteria in urine, as well as cultured bacteria, were rapidly detected using qPCR techniques. These techniques will be used as rapid and cost-effective methods in the laboratory. Therefore, this test could be a good candidate to create real-time PCR kits for the detection of resistance genes directly from urine in clinical or epidemiological settings.