OBJECTIVES: To assess risk factors for acquiring extended-spectrum β-lactamase-producing Gram-negative bacteria (ESBL+ GN) causing urinary tract infections (UTIs) in long-term care facilities (LTCFs). METHODS: A prospective case-case-control study was carried out. In the first study, cases were defined as patients harbouring ESBL+ GN, while, in the second study, cases were defined as patients harbouring ESBL-negative (ESBL-) GN. Controls were selected by simple random sampling from patients without GN infection. ESBL determinants were characterized by hybridization, and confirmed by PCR and sequencing. RESULTS: The study involved 297 LTCF patients (99 with ESBL+ GN UTI, 99 with ESBL- GN UTI and 99 without GN infection). ESBL+ GN UTIs were due to Escherichia coli (64%), Proteus mirabilis (25%) and Klebsiella pneumoniae (11%). The CTX-M-type enzymes were the most prevalent (73% of isolates), whereas TEM- and SHV-type ESBLs and AmpC-type enzymes were less prevalent (10%, 2% and 15% of isolates, respectively). Patients with ESBL+ GN UTI were more likely to have a permanent urinary catheter (OR 15, 95% CI 6.9-30.5) and to have received antimicrobial therapy in the previous 30 days (OR 4, 95% CI 1.2-10.9). After adjusting for type, dosage and duration of antibiotic, exposure to ≥7 days of quinolones and third-generation cephalosporins was associated with the highest risk of ESBL+ GN UTI development (OR 7, 95% CI 1.2-40). Independent risk factors for acquiring ESBL- GN UTIs were previous surgical procedures (OR 2, 95% CI 1.1-4) and the presence of a urinary catheter (OR 8, 95% CI 4-16). No specific antibiotics remained a significant risk for ESBL- GN UTI after adjusting for demographic and clinical risk factors. CONCLUSIONS: Exposure to ≥7 days of quinolones and third-generation cephalosporins significantly increases the risk of ESBL+ GN UTI. Interventions aimed at improving compliance with antimicrobial stewardship principles should be further developed and implemented in LTCFs.