OBJECTIVE: To describe the use of antibiotics for urinary tract infection (UTI) before and after surgery for urinary incontinence (UI); and for those with use of antibiotics before surgery, to estimate the risk of treatment for a postoperative UTI, relative to those without use of antibiotics before surgery. DESIGN: A historical population-based cohort study. SETTING: Denmark. PARTICIPANTS: Women (age ≥18 years) with a primary surgical procedure for UI from the county of Funen and the Region of Southern Denmark from 1996 throughout 2010. Data on redeemed prescriptions of antibiotics ±365 days from the date of surgery were extracted from a prescription database. MAIN OUTCOME MEASURES: Use of antibiotics for UTI in relation to UI surgery, and the risk of being a postoperative user of antibiotics for UTI among preoperative users. RESULTS: A total of 2151 women had a primary surgical procedure for UI; of these 496 (23.1%) were preoperative users of antibiotics for UTI. Among preoperative users, 129 (26%) and 215 (43.3%) also redeemed prescriptions of antibiotics for UTI within 0-60 and 61-365 days after surgery, respectively. Among preoperative non-users, 182 (11.0%) and 235 (14.2%) redeemed prescriptions within 0-60 and 61-365 days after surgery, respectively. Presurgery exposure to antibiotics for UTI was a strong risk factor for postoperative treatment for UTI, both within 0-60 days (adjusted OR, aOR=2.6 (95% CI 2.0 to 3.5)) and within 61-365 days (aOR=4.5 (95% CI 3.5 to 5.7)). CONCLUSIONS: 1 in 4 women undergoing surgery for UI was treated for UTI before surgery, and half of them had a continuing tendency to UTIs after surgery. Use of antibiotics for UTI before surgery was a strong risk factor for antibiotic use after surgery. In women not using antibiotics for UTI before surgery only a minor proportion initiated use after surgery.