The single-component flavin-dependent tryptophan halogenase AetF converts tryptophan to 5,7-dibromotryptophan during the biosynthesis of the neurotoxin aetokthonotoxin. Crystal structures of AetF with the substrates tryptophan and 5-bromotryptophan show that a flip of the indole moiety of tryptophan positions first C5 and then C7 in the same location in the active site to facilitate two successive bromination reactions.