Introduction: Healthcare-associated infections are a global public health issue with farreaching individual and economic repercussions. The microorganism’s multi-resistance frequently increases the risk that can be lowered by using biomolecules of medicinal plant essential oils (EOs). This study investigated the phytochemical components and antimicrobial potential of the EOs of Moroccan Origanum compactum and Ruta montana gathered from Taza Region. Methods: The EOs’ chemical analysis was performed by GC/MS and their antimicrobial effects were assessed by the microplate dilution method against eight nosocomial resistantbacterial strains. Results: The main constituents of O. compactum EO were Thymol (29.56%), carvacrol (26.44%), γ-terpinene (18.86%) and p-cymene (12.01%), while those of R. montana EO were 2-undecanone (85.76%), 2-nonanone (3.95%), 2-decanone (3.67%) and 2-dodecanone (1.94%). The O. compactum EO had important antimicrobial effects on all bacteria experienced. The lower minimum inhibitory concentration (MIC) values were obtained for the tested Staphylococcus species (0.062%, 0.125% (v/v)) while the highest one (2% (v/v)) was obtained for Klebsiella pneumonia and Pantoea spp. The R. montana EO showed MIC values of 4% (v/v) for Pantoea spp. and 8% (v/v) for the other tested strains except K. pneumonia for which no effect was shown. Conclusion: Therefore, these EOs, especially the O. compactum one, have an interesting antibacterial potential against nosocomial infections and might be used to develop new antimicrobial agents.