Three pumpkins of different sizes, one of a different type on the left. onta wooden floor against a gray wallCredit: Unsplash.

Roughly 30,000 years ago, along the soggy edge of a Florida floodplain, a hungry American mastodon lumbered through the wet grass in search of a meal. Scattered across the ground were small, mottled orbs about the size of tennis balls.

To a squirrel, a deer, or a passing human, these fruits were off limits. Encased in a woody, near-impenetrable rind, their flesh was saturated with cucurbitacins — some of the most intensely bitter and toxic compounds in the natural world. A few bites could sicken or even kill a small mammal.

To a multi-ton mastodon, however, the little gourds were a perfectly reasonable snack. The giant proboscidean crushed the tough shells between its massive molars, swallowed the bitter mash without flinching, and wandered off to deposit the intact seeds miles away in a steaming pile of nutrient-rich dung.

For millions of years, that was how the genus Cucurbita — the botanical lineage that includes modern pumpkins, zucchinis, and winter squashes — made its living. Then, at the close of the Pleistocene Epoch, the mastodons vanished. And by all the standard rules of evolution, the pumpkin should have followed them into oblivion.

So, by all accounts, the cheerful orange jack-o’-lantern sitting on your porch is what biologists call an evolutionary anachronism — a species that evolved to survive in a world that has now vanished. The pumpkin’s lineage was built on the backs of extinct giants and was rescued at the last possible moment by the very type of creature it evolved to repel.

A Fruit Designed to Repel

If you have ever bent a kitchen knife trying to carve a Halloween jack-o’-lantern, you have experienced the pumpkin’s central evolutionary paradox firsthand.

Most fleshy fruits — think of wild berries, plums, or figs — evolve as colorful, sugar-packed bribes. Plants spend energy making them soft and delicious so that birds and mammals will eat them and scatter their seeds. Wild cucurbits took the opposite approach. Everything about their anatomy seems engineered to say keep out.

In 2015, a team of researchers led by Logan Kistler, an anthropologist and archaeobotanist, published a study in the Proceedings of the National Academy of Sciences that pieced together why wild squashes are so aggressively unpleasant. Their conclusion was that Cucurbita evolved exclusively for Ice Age megafauna, whose huge size made them tolerant to the toxins.

The first smoking gun came from northern Florida’s Aucilla River. In 1998, paleobotanists examining 30,000-year-old preserved mastodon dung discovered dozens of intact, wild gourd seeds embedded in the ancient feces. Giant herbivores like mastodons, gomphotheres, and giant ground sloths were the only animals with the jaw strength to easily crack the gourds’ armored rinds without grinding up the seeds inside.

Just as important, these prehistoric bulldozers were ecological engineers. Wild cucurbits are weedy, sprawling vines that struggle in dark, dense forests; they need sunlight and churned-up soil. As megafauna crashed through brush, tore down branches, and trampled vegetation, they maintained the open, disturbed-ground habitats that wild gourds required to sprout.

Evolutionary Strategy

Various images of a pumpkin-like plant called a buffalo-gourd, showing the flower, leafy stems and different stages of fruit developmentWhile the exact wild ancestor of our modern Halloween pumpkin went extinct in the wild, several close cousins in the Cucurbita genus survived in isolated ecological pockets across the Americas. Here is one of the best living stand-ins for what a mastodon would have snacked on: the buffalo gourd (Cucurbita foetidissima), which still grows wild across the American Southwest and Mexico. Credit: Wikimedia Commons.

Why would a plant make its fruit toxic if the whole point of a fruit is to be eaten? Because the plant is being picky about who eats it.

From the gourd’s perspective, a mouse or a deer is a terrible dinner guest. When small mammals nibble on a gourd, their sharp teeth grind the seeds to a pulp, destroying the plant’s chances of reproducing. A mastodon, on the other hand, is the ideal partner because it gulps the fruit down whole, lets the seeds pass unharmed through its digestive tract, and deposits them miles away in a pile of fertilizer.

Of course, it’s not like the plant has any say any of this in directing its design. Evolution is directed by natural selection, and the way a plant looks or reproduces is simply the effect of certain strains with certain random mutations outcompeting other less optimized designs for its environment.

Biologists call this evolutionary strategy directed deterrence — sort of like acting as a biological bouncer that poisons unwanted guests while letting VIPs right through.

The Chemistry of Directed Deterrence

You can see directed deterrence at work in your kitchen cabinet with chili peppers. When mammals like humans eat a chili pepper, our grinding molars crush the delicate seeds inside. To stop us, peppers evolved capsaicin — a chemical that triggers pain receptors in mammal mouths. So, it tricks our brains into feeling like our tongues are literally on fire. Jokes on the chilli, though, because some humans love pain in their mouths.

Birds don’t have teeth, so they swallow berries and peppers whole and fly away, scattering intact seeds far and wide in their droppings. Because birds are the pepper’s ideal delivery service, evolution shaped capsaicin so that bird pain receptors are completely blind to it. A bird can gobble down the world’s hottest habanero without feeling a thing.

To test how ancient animals would have reacted to this chemical defense in the case of the pumpkin’s ancestors, Kistler and his colleagues analyzed the genomes of over 40 mammal species, ranging from tiny shrews to modern elephants, counting their TAS2R bitter-taste receptor genes. Bitterness in nature functions as an early-warning system against poison, and the researchers uncovered a striking correlation: the smaller the mammal, the more bitter-taste receptors it possessed.

Small mammals carry a vast arsenal of bitter-taste genes because even a tiny dose of plant toxin can overwhelm their small bodies. Giant mammals like elephants—and their extinct cousins, the mastodons—have remarkably few bitter-taste receptors. Because of their immense body mass, they can ingest huge quantities of cucurbitacins without suffering ill effects, rendering the gourd’s chemical weapons moot.

For millions of years, the arrangement was airtight. Small seed-crushers were poisoned or disgusted; giant seed-spreaders got a free meal.

Stranded in the Holocene

Around 12,000 years ago, as the Pleistocene ice sheets retreated and the Holocene began, the grand partnership collapsed. Across the Americas, every single terrestrial mammal weighing more than 1,000 kilograms — mammoths, mastodons, giant sloths, toxodons — went extinct, likely driven over the edge by a combination of rapid climate shifts and newly arrived human hunters.

For Cucurbita, the megafaunal extinction was an existential catastrophe. Overnight, their seed taxis were gone. Worse, without giant herbivores trampling the landscape, dense forests closed in over the sunny, disturbed patches where the vines thrived. And because the plants had spent millions of years evolving to poison every surviving small mammal on the continent, they could not recruit new dispersal partners — at least not fast enough in evolutionary terms.

When Kistler’s team sequenced the plastid genomes of 91 ancient, wild, and modern domestic cucurbit samples, they saw the genetic scars of this bottleneck. Across the Americas, wild gourd ranges fractured and shrank into isolated ecological refuges. Many wild lineages went completely extinct. In fact, some of our most familiar supermarket squashes today—including the lineage that gave us pumpkins and zucchinis—have no known surviving wild ancestors left on Earth.

The Container That Became a Crop

Jock o lantern pumpkin on fire with smoke coming from the faceCredit: Unsplash.

As wild gourds retreated toward extinction around 10,000 years ago, a new ecological engineer stepped into the breach: the humble Homo sapiens.

Like mastodons, early humans cleared land, disturbed the soil around their camps, and created sunny trash heaps — accidentally replicating the exact habitat wild cucurbits craved. Yet given that wild gourds were toxic enough to cause severe gastrointestinal distress, why did ancient Americans bother with them at all?

Archaeologists suspect that humans didn’t initially view cucurbits as food, but as hardware of sorts. For hunter-gatherers and early foragers prior to the invention of pottery, a hard-shelled, hollow gourd was very useful indeed. Dried out, the thick rinds that once protected seeds from rodent teeth made lightweight, durable water jugs, bowls, storage vessels, and even net floats for fishing.

Once humans began keeping and planting these useful gourds near their settlements, two crucial things happened to transform a bitter tool into a staple crop. Inevitably, curious foragers tasted the seeds or flesh of mutant gourds that lacked the usual flood of bitter toxins, and they carefully saved and replanted those palatable seeds.

Timeline of how humans saved the pumpkin population

Under normal circumstances, this early selective breeding would have been ruined by wild gourds growing nearby, whose wind- and bee-borne pollen would constantly cross-fertilize the tended plants and flood their gene pool right back with wild, bitter DNA. Instead, because wild cucurbits were actively dying out across the post-Ice Age landscape, human-tended garden patches stood in natural isolation — protected from wild cross-pollination and free to rapidly evolve into the sweet, fleshy squashes we eat today.

In a twist of evolutionary irony, the very collapse that nearly wiped Cucurbita off the map allowed ancient Indigenous farmers across North, Central, and South America to independently transform toxic, baseball-sized gourds into sweet, gigantic staples of the human diet.

Every autumn, when we haul millions of pumpkins out of fields to bake into pies or carve into grinning lanterns, we are participating in a 10,000-year-old rescue mission — keeping alive a prehistoric orphan that was never meant for us at all.