Nitrofurantoin has been used for decades for the treatment of urinary tract infections (UTIs), but clinically significant resistance in Escherichia coli is uncommon. Nitrofurantoin concentrations in the gastrointestinal tract tend to be low, which might facilitate selection of nitrofurantoin-resistant (NIT-R) strains in the gut flora. We subjected two nitrofurantoin-susceptible intestinal E. coli strains (ST540-p and ST2747-p) to increasing nitrofurantoin concentrations under aerobic and anaerobic conditions. Whole-genome sequencing was performed for both susceptible isolates and selected mutants that exhibited the highest nitrofurantoin resistance levels aerobically (ST540-a and ST2747-a) and anaerobically (ST540-an and ST2747-an). ST540-a/ST540-an and ST2747-a (aerobic MICs of >64 μg/ml) harbored mutations in the known nitrofurantoin resistance determinants nfsA and/or nfsB, which encode oxygen-insensitive nitroreductases. ST2747-an showed reduced nitrofurantoin susceptibility (aerobic MIC of 32 μg/ml) and exhibited remarkable growth deficits but did not harbor nfsA/nfsB mutations. We identified a 12-nucleotide deletion in ribE, encoding lumazine synthase, an essential enzyme involved in the biosynthesis of flavin mononucleotide (FMN), which is an important cofactor for NfsA and NfsB. Complementing ST2747-an with a functional wild-type lumazine synthase restored nitrofurantoin susceptibility. Six NIT-R E. coli isolates (NRCI-1 to NRCI-6) from stools of UTI patients treated with nitrofurantoin, cefuroxime, or a fluoroquinolone harbored mutations in nfsA and/or nfsB but not ribE. Sequencing of the ribE gene in six intestinal and three urinary E. coli strains showing reduced nitrofurantoin susceptibility (MICs of 16 to 48 μg/ml) also did not identify any relevant mutations. NRCI-1, NRCI-2, and NRCI-5 exhibited up to 4-fold higher anaerobic MICs, compared to the mutants generated in vitro, presumably because of additional mutations in oxygen-sensitive nitroreductases.