NrfB is a small pentahaem electron-transfer protein widely involved in the respiratory reduction of nitrite or nitric oxide to ammonia, processes that provide energy for anaerobic metabolism in many enteric bacteria and also serve to detoxify these reactive nitrogen species. The X-ray crystal structure of Escherichia coli NrfB is presented at 1.74 Å (1 Å=0.1 nm) resolution. The architecture of the protein is that of a 40 Å ‘nanowire’ in which the five haems are positioned within 6 Å of each other along a polypeptide scaffold. During nitrite reduction, the physiological role of NrfB is to mediate electron transfer to another pentahaem protein, NrfA, the enzyme that catalyses periplasmic nitrite or nitric oxide reduction. Protein–protein interaction studies suggest NrfA and NrfB can form a 20-haem NrfA2–NrfB2 heterotetrameric complex.