A case-control study was conducted in order to identify the risk factors associated with bloodstream infection caused by Escherichia coli producing extended-spectrum beta-lactamase (ESBL) and to determine the outcomes of infected patients. Risk factors associated with ESBL production, according to univariate analysis, included a history of recent hospitalization [odds ratio (OR) 4.3, 95% confidence interval (CI) 2.1-8.9; p < 0.001], severe underlying diseases (OR 15, 95% CI 4.4-51.5; p < 0.001), prior exposure to urinary catheters (OR 8.3, 95% CI 3.2-21.7; p < 0.001) and nosocomial (OR 14.1, 95% CI 6.1-32.8; p < 0.001) or urinary (OR 3.6, 95% CI 1.7-7.4; p < 0.001) origin of the bacteria. Multivariate analysis revealed that severe underlying diseases (OR 31.2, 95% CI 6.7-144; p < 0.001) and nosocomial (OR 16.5, 95% CI 5.6-49; p < 0.001) and urinary origins (OR 7.8, 95% CI 2.6-23.8; p < 0.001) of the bacteria were independently associated with ESBL production in bacteremic E. coli. Crude mortality in case patients was more than twice as high as that in controls (p = 0.04). Production of ESBL increased the risk of inappropriate initial therapy (OR 95.6, 95% CI 27.4-334.2; p < 0.001). Treatment failed in 4/7 case patients treated with ceftazidime to which the isolate was susceptible in vitro. Our findings have implications for the choice of empirical therapy in nosocomial urinary tract infection.