A five-module bacterial enzyme has left a trail of 49 different toxins—and researchers in Marburg have traced how some of them arose. The compounds, called GameXPeptides, help bacteria kill insect larvae, but their history also offers clues about how nature builds new molecules.

Many medicines that fight infection come from bacteria. Some are nonribosomal peptides, or NRPs: small compounds assembled by large enzyme systems rather like factory lines. These systems add amino acids in sequence to make a finished peptide. Scientists hope to redesign the enzymes to create new drug candidates. But first, they need to understand how the natural systems change.

Unlike most proteins, which often evolve through changes to individual DNA building blocks, the enzymes that make NRPs can exchange whole stretches of genes. This swapping, called recombination, can rearrange the enzyme’s modules and produce peptides with different chemical structures. It also makes evolutionary history difficult to read, because each swap can overwrite part of the past.

A team led by Helge Bode of the Max Planck Institute for Terrestrial Microbiology and Georg Hochberg of the University of Marburg tackled that problem by studying GameXPeptides, or GXPs. These insect-killing compounds are made by Xenorhabdus and Photorhabdus bacteria. The bacteria live with nematodes, tiny worms that infect insect larvae. When the nematodes enter an insect, they release the bacteria, which help kill the host. As insects develop resistance, the bacterial toxins face pressure to change too.

The researchers focused on GxpS, the enzyme machinery that makes the peptides. Its five modules made it small enough to reconstruct in detail. By comparing its evolutionary history, the team identified 49 distinct GXP compounds, including shortened ring-shaped tetrapeptides and a longer hexapeptide. They also found that separate bacterial lineages had independently evolved identical or very similar peptide structures.

To look further back, the scientists rebuilt the last common ancestor of GxpS. They restored about 15,000 DNA base pairs, assembled them into a working gene and brought the gene to life in Escherichia coli bacteria. This let them examine the ancestral enzyme and work out the order in which modern variants appeared.

The study found that natural selection is not the only force shaping GXP diversity. Genetic drift—the role of chance in which gene variants become more common—and a bias in recombination also contribute. To test for selection, the researchers used swaps between modules with the same specificity, which do not change the peptide’s structure, as a baseline for neutral evolution. They compared these with swaps between different modules that do alter the amino acid sequence.

Understanding those forces could help researchers make sense of how bacterial molecules evolve, and improve efforts to engineer enzyme assembly lines for useful compounds. The work, published in Nature Ecology & Evolution, does not turn GXPs into medicines, but it offers a clearer map of how nature has already explored new chemical designs. As Hochberg put it, frequent recombination can erase pieces of an enzyme’s past—yet studying those changes revealed a history shaped by selection, chance and gene swapping.