The photos are truly the stuff of nightmares: Swarms of desert locusts blocking out the sun, blanketing fields, and devouring crops in East Africa, the Middle East, and South Asia. It’s the worst outbreak those regions have seen in decades. The locusts were already becoming a crisis, threatening food security and livelihoods in Kenya and Ethiopia by the time the novel coronavirus began crossing borders in late January.

Since then the situation has only gotten worse — a wet spring created the right conditions for the bugs to keep multiplying.

Scientists don’t know what causes locusts to flock together in the first place. The creature has a mysterious split personality. Locusts can be “solitary” — antisocial, independent, relatively benign. But under certain conditions, which are not fully understood, they can become “gregarious” — traveling together in masses that rival the size of cities, with more than a hundred million bugs packed into each square mile. Right now, the best available method to control the swarms is spraying pesticides, which can be dangerous for ecosystems and human health, depending on what chemicals are used. But if scientists can figure out why locusts become gregarious, that could unlock better options.

A new study published in Nature on Wednesday documents a significant breakthrough on that front. Researchers at the Chinese Academy of Sciences in Beijing identified a specific chemical substance, or pheromone, released by the migratory locust that attracts others to its side. The migratory locust is a different species than the desert locust currently making headlines, but it is a similarly destructive pest — and experts told Grist that the discovery will be directly relevant to developing new methods to stave off both species.

Grist thanks its sponsors. Become one.

“There is a lot of overlap in the chemistry of the two locust species,” said Baldwyn Torto, a scientist at the International Centre of Insect Physiology and Ecology in Kenya, who said the species have similar biology and behavior. (Torto was not involved in the new research.)

The study found that all the locusts examined — solitary and gregarious, young and old, male and female, in the lab and in the field — were attracted to a pheromone known as 4-vinylanisole, or 4VA. The chemical is released mainly by gregarious locusts, and the more locusts they stuck together in a cage, the more each bug let loose. Even though solitary locusts did not emit 4VA on their own, when the researchers put just four or five solitary locusts together, they began to produce the pheromone, too.

The results indicate that scientists could measure 4VA emissions to monitor populations and predict swarms, or use 4VA lures to attract the bugs to a concentrated area where they could be killed with pesticides. “Monitoring the build up of locust populations is absolutely key to their effective control,” said Stephen Rogers, a research associate at the University of Cambridge who was not involved in the study. “Incipient swarms can be nipped in the bud before numbers become overwhelming.”

The team behind the new study made a second discovery that experts said could be even more helpful: It identified the specific receptor in the locust’s antenna that detects 4VA. That knowledge could be used to develop a treatment that inhibits the receptor, essentially blinding the locust to its own pheromone.

Grist thanks its sponsors. Become one.

“I hate seeing those pictures of the planes going and people spraying the pesticides because those kill everything,” said Leslie Vosshall, a molecular neurobiologist at The Rockefeller University, who reviewed the study before it was published. “If instead, you could have these planes that are spraying molecule X, it would be really selective, it wouldn’t kill anything. It just turns this receptor off or prevents the receptor from finding the pheromone. At least on paper, that would have a huge effect.”

The study described one other possibility for mitigating swarms. Using gene editing, mutant locusts that lack the special receptor for 4VA could be bred and released into the wild. But neither Vosshall or Rogers felt that path would be worth pursuing anytime soon.

“One of the major issues with locusts is that they affect livelihoods in regions of the world where life is already precarious and difficult,” Rogers said. “And high-tech solutions tend to be expensive.”

The new study is not going to help with the current outbreak in Africa and the Middle East, as no one has studied whether the desert locust is attracted to 4VA, but experts agreed it presents a blueprint for scientists to find out what does seduce that cursed species.