The idea behind the guillotine is this: If you’re going to execute someone, you may as well do it efficiently and humanely, at least by 18th-century standards. Decapitating the condemned with an ax or sword may take a few swings—unacceptable for carrying out justice in a "civilized" society. The guillotine, on the other hand, is downright surgical, a perversely methodical way to end a life.

Now mosquitoes are getting the same treatment in the pursuit of a vaccine for malaria, a disease that killed 440,000 people in 2016. To produce a vaccine for mass deployment, biotech firm Sanaria has to decapitate and dissect out the salivary glands, which hold the malaria-causing parasite, for each individual mosquito—by hand. To speed up this painstaking process, they’ve partnered with medical roboticists from Johns Hopkins University to engineer a mosquito guillotine that technicians can use to decapitate 30 insects at a time. It’s a first step toward an eventual goal of a fully automated robotic guillotine, which could help Sanaria produce that elusive mass-produced, effective malaria vaccine.

Despite decades of work, a malaria vaccine is still not widely available. The first reason is the complex life cycle of the microbe that causes malaria, Plasmodium falciparum. Unlike a bacteria or virus, which tend to have relatively simple life cycles, this protozoan parasite develops both in mosquitoes and in humans. In particular, the challenge is targeting the parasite in one particular cell type before it invades another—say, from the liver to red blood cells—because each stage is brief.

“We don't have any vaccines in widespread human use against parasites,” says Ashley Birkett, director of PATH’s Malaria Vaccine Initiative, who wasn’t involved in this research. “They're extremely complex.”

Two, the idea behind a vaccine is to encourage the body’s own immune system to fight an invader. A flu vaccine, for instance, uses a deactivated version of the virus to trick your body into ramping up production of antibodies, which protects you from the real flu virus out in the wild. But with the malaria parasite, researchers are finding that the immune response you need to protect against this parasite is far higher than with a bacteria or virus vaccine.

“In some cases we're talking orders of magnitude higher immune responses,” says Birkett. The protective responses might only last for six months. “One of the key challenges in developing more effective malaria vaccines is really to understand how can we induce immune responses that can persist at a level that's needed to provide high-level protection for many years.”