This story was originally published by WIRED and is reproduced here as part of the Climate Desk collaboration.

As weeds go, Arabidopsis thaliana is a rather charming specimen. On a spring day, you might see it sprouting from the cracks of a parking lot, unleashing a small riot of white flowers that give it the common name “mouse ear cress.” But its rotund leaves often bear unwelcome passengers: among them, a bacteria called Pseudomonas syringae. It sits there looking for a way into the plant, usually the stomata through which the leaf takes in water and carbon dioxide, or through a wound. That’s when things get interesting.

Reader support makes our work possible. Donate today to keep our site free. All donations DOUBLED!

Typically, the first warning of the invasion comes from receptors that tell the plant cells to unleash their defenses. Among the most important is a hormone called salicylic acid or SA. It’s used not just by arabidopsis, but by many other plants, including major crops, to stave off infections. But imagine that this spring day is unusually hot. A few days into a passing heat wave, you’ll see that the plant’s leaves are growing yellow and withered. Its immune system seems to be failing.

For much of the past decade, Sheng-Yang He, a plant biologist at Duke University, has been studying why plant immune systems fail in the heat. It’s a molecular mystery that involves unpacking dozens of genes to figure out why plants can no longer produce important chemicals, like SA, when temperatures rise just a few degrees. That’s the kind of dysfunction that is expected to become vastly more common for all sorts of plants as the climate changes and heat waves become more intense and frequent. And now, in a paper published in Nature, He’s team describes how that immunity can be restored.

Grist thanks its sponsors. Become one.

There is no one way that climate change will affect plants. In some cases, rising heat and CO2 levels might hasten photosynthesis, causing them to grow faster. In others, they may shrivel and die from the stress of overheating. The geography of climate change will also vary greatly, causing crippling drought in some places while other ecosystems drown. Overall, such rapid change is not good for organisms that cannot swiftly walk themselves over to new habitats, like animals can. And just as more diseases are expected to spill over into people as the range of pests and pathogens spreads in a warming world, plants too will face new or more aggressive pestilence within their native ecosystems or farmland. Last week, a separate study published by researchers at the Chinese University of Hong Kong projected global crop yields could fall 20 percent by 2050 due to the effects of climate change.

But a surprising effect of heat is that changes occur inside plant immune systems themselves. Plants lack what’s known as adaptive immunity, such as the cells found in animals that learn from meeting a new microbial foe and are ready to leap into action when they face it again. But they have a whole arsenal of other defenses at their disposal. Each chemical response, like SA production, depends on the action of many genes that translate various proteins to others. These steps work well in the plant’s normal environment, but a kink in the process due to an external factor like heat can derail the whole thing. “We’re talking about millions of years of evolution,” says He, who is also an investigator with the Howard Hughes Medical Institute. “The last 150 years have dramatically changed things, and humans are responsible for it.”

He grew up in a farming community in eastern China, where he recalls the smell of pesticides hanging in the air during growing season. In elementary school, he’d join other children in the fields as part of a “pest control squad” that pried caterpillars off of cotton plants. Today in the lab, much of his work involves doing exactly the opposite: inoculating plants with disease-causing bacteria. His goal is to study the effects of turning the expression of specific plant genes up or down, looking for changes that signal the role they have in its immune response.

Much of this work has been done on the hardy arabidopsis — “the lab rat of plants,” as He puts it. There are a few things that make it the perfect test subject. One is that the humble weed’s genome is fairly short, part of the reason it was the first plant to be fully sequenced. Another is the unique way its code can be modified. For most plants, the process is painstaking. New genetic material is introduced in a petri dish, borne by bacteria that slip into the plant’s cells. Once that happens, those modified cells must be cultured and coaxed into new roots and stems. But arabidopsis offers a shortcut. Biologists need only dip the plant’s flowers into a solution filled with gene-bearing bacteria and the messages will be carried straight to the seeds, which can simply be planted. In the painstakingly slow field of botany, that’s going at warp speed.

Grist thanks its sponsors. Become one.

Still, it took years to figure out what all those SA-producing genes did in perfect greenhouse conditions. Only then could He’s team start tampering with the environment to test what goes wrong. Their mission: find a gene or genes that control whatever step was holding up SA production when it got hot. It took 10 years to find the answer. They modified gene after gene, infecting the plants and looking at the effects. But no matter what they did, the plants still withered from disease. “You wouldn’t believe how many failed experiments we had,” He says. Major leads, such as another’s lab identification of heat-responsive genes that affect flowering and growth, ended in crushing disappointment. Generations of grad students kept the project going. “My job is mainly to be their cheerleader,” he says.

Eventually, the lab found a winner. The gene was called CBP60g, and it seemed to act as a “master switch” for a number of the steps involved in making SA. The process of taking those genetic instructions and producing a protein was being stifled by an intermediate molecular step. The key was to bypass it. The researchers could do that, they found, by introducing a new stretch of code — a “promoter” taken from a virus — that would force the plant to transcribe the CBP60g and restore the SA assembly line. There was another apparent benefit: The change seemed to also help restore less-understood disease-resistance genes that were being suppressed by heat.

He’s team has since begun testing the gene modifications on food crops like rapeseed, a close cousin of arabidopsis. Apart from the genetic similarities, it’s a good plant to work with, he says, because it grows in cool climates where the plant is more likely to be affected by rising temperatures. So far, the team has had success turning the immune response back on in the lab, but they need to do field tests. Other potential candidates include wheat, soybeans, and potatoes.

Given the ubiquity of the SA pathway, it’s not surprising that He’s genetic fix would work broadly across many plants, says Marc Nishimura, an expert in plant immunity at Colorado State University who wasn’t involved in the research. But it’s only one of many climate-sensitive immune pathways biologists need to explore. And there are variables other than heat waves that will affect plant immunity, he points out, such as increasing humidity or a sustained heat that lasts through the entire growing season. “It may not be the perfect solution for every plant, but it gives you a general idea of what goes wrong and how you can fix it,” he says. He considers it a win for using basic science to decipher plant genes.

But for any of this to work, consumers will need to accept more genetic tinkering with their food. The alternative, Nishimura says, is more crop loss and more pesticides to prevent it. “As climate change accelerates, we’re going to be under pressure to learn things in the lab and move them into the field faster,” he says. “I can’t see how we’re going to do this without more acceptance of genetically modified plants.”