Schematic showing the product distribution of the AetD-catalysed reaction in native and shunt pathways. The native pathway yields 5,7-dibromo-indole-3-carbonitrile (8) and glycolic acid (11) as products, whereas 5,7-dibromo-indole-3-carbaldehyde (10), glyoxylic acid (12) and ammonia are the products in the shunt pathway. Labelling experiments with 13C-labelled isotopologues of the substrate confirmed the fate of the carbon atoms of the 2-aminopropionyl side chain and are colour-coded accordingly. Refer to Extended Data Figs. 5, 7 and 8, and Supplementary Fig. 4 for full set of liquid chromatograms, and MS and NMR spectra.