The next time you dab wasabi on your sushi or spread mustard on your hot dog, take a moment to thank a caterpillar. It may sound unlikely, but the critters play a critical role in creating the sharp, pungent flavors that give those condiments a savory kick.

Turns out, the flavors of these condiments are the result of millions of years of plants and caterpillars duking it out to survive. In a paper published this month in Proceedings of the National Academy of Sciences, a group of scientists explore how exactly caterpillars drove plants to make chemicals that humans find tasty.

It happened through what's called an evolutionary arms race, explains Chris Pires, a plant evolutionary biologist at the University of Missouri and one of the lead authors of the study. This works a lot like a military arms race — repeated escalations to have better weapons or defenses — but on an epic timescale. In this case, the opposing armies are caterpillars of the cabbage butterfly and plants in the order Brassicales, which today includes cabbage, horseradish, kale and mustard.

So here's what happened: Some 90 million years ago, Pires explains, the ancestors of these vegetables evolved defenses to protect themselves from being eaten by insects: They started making chemicals called glucosinolates. "Most bugs don't like it. It's toxic," Pires says. "It turns their guts inside out."

Glucosinolates are a major component of mustard oil, so for simplicity's sake, let's call the defense, as Pires does, "a mustard oil bomb."

Fast-forward 10 million years, and the arms race escalated. The caterpillars evolved a protein that allowed them to defuse the mustard oil bomb — they "figured out how to eat that mustard" and not get sick, Pires says. With this new food source, which no other insect could safely touch, the cabbage butterflies evolved into several different species that could eat plants with mustard oil.

Time for countermeasures. To combat their diverse new pests, "the plants made a fancier bomb," Pires says. That is, some plants started using different amino acid ingredients to make new glucosinolates.

Once again safe from predators, new cabbage species evolved. But then the butterflies responded: More caterpillars figured out how to defuse this new flavor of mustard oil bomb, then evolved into more species. So an even fancier mustard oil bomb evolved in the cabbage plants ... and again, some of the cabbage butterflies evolved to eat them anyway.

The arms race isn't a new story. The war between cabbage butterflies and cabbage plants was described years ago as an example of coevolution: when the evolution of one species means an interacting species has to evolve to keep up. What no one knew was how or when the escalations happened.

To figure that out, Piers and his group made evolutionary family trees of both the plants and the butterflies. When they lined them up next to each other, the arms race snapped into focus. When the plants evolved a mustard oil bomb, their tree branched into more species. When the butterflies evolved a defense, their tree branched. Each group was clearly responding to its antagonist. And the way they were achieving these escalations was a little strange: Instead of just tweaking the genes they had, the combatants made entirely new copies of their genes — or in some instances, of their entire genomes. That's a pretty neat trick in the natural world.

So what does this have to do with condiments?

We humans happen to find glucosinolates delicious. These chemicals — there are hundreds — impart unique smells and flavors to the plants that contain them. Many glucosinolates are in the cruciferous vegetables that evolved from those ancient cabbage plants when the family tree expanded.

"Glucosinolates have at least two sensory properties: burn and bitter," Danielle Reed tells The Salt via email. She studies taste at Monell Chemical Senses Center. Reed explains that glucosinolates with the "burning" sensory property are found in plants like wasabi, while those with the "bitter" property are found in plants like broccoli.

"There is a cocktail of glucosinolates in many plants, and they do contribute to the overall flavor," Reed says. While many other compounds contribute to the taste of radishes or cauliflower, glucosinolates provide the dominant note.

For us, it works just like it does for caterpillars. When we cut or bite the plant, a defensive chemical reaction occurs. The glucosinolates are turned into other chemicals: the mustard oil bomb. We experience the bomb as, if you will, an explosion of taste.

And humans have learned to make the most dramatic flavors into condiments. The sharp tastes of wasabi, horseradish and mustard exist thanks to millions of years of plants fighting off marauding caterpillars.

Copyright 2016 NPR. To see more, visit