Interpretation of the constantly expanding body of genomic information requires that the function of each gene be established. Here we report the genomic analysis and structural modelling of a previously uncharacterized redox-metabolism protein UrdA (SO_4620) of Shewanella oneidensis MR-1, which led to a discovery of the novel enzymatic activity, urocanate reductase. Further cloning and expression of urdA, as well as purification and biochemical study of the gene's product UrdA and redox titration of its prosthetic groups confirmed that the latter is indeed a flavin-containing enzyme catalysing the unidirectional reaction of two-electron reduction of urocanic acid to deamino-histidine, an activity not reported earlier. UrdA exhibits both high substrate affinity and high turnover rate (Km << 10 μM, kcat = 360 s−1) and strong specificity in favour of urocanic acid. UrdA homologues are present in various bacterial genera, such as Shewanella, Fusobacterium and Clostridium, the latter including the human pathogen Clostridium tetani. The UrdA activity in S. oneidensis is induced by its substrate under anaerobic conditions and it enables anaerobic growth with urocanic acid as a sole terminal electron acceptor. The latter capability can provide the cells of UrdA-containing bacteria with a niche where no other bacteria can compete and survive.