A gene drive is a form of genetic engineering that seeks to push modified genes through a population. The Bill and Melinda Gates Foundation has funded a program called Target Malaria that envisions using a gene drive to combat the mosquitoes that carry malaria, a disease that kills nearly half a million people a year.

This remains a new, speculative technology that even its advocates acknowledge is not ready to be deployed in the natural environment. One potential application would be to genetically modify mosquitoes in one of the few species that spread malaria and then release the engineered mosquitoes in the wild. One modification, for example, could make it more likely that mosquito offspring will be infertile. That has already been shown in caged mosquitoes to be an effective way to crash the population of a disease-carrying species.

Opponents of gene drives, however, say this is a dangerous and slippery business, that it’s tampering with nature in a way that could lead to unintended ecological consequences and could wind up as a tool of profit-seeking multinational corporations at the expense of small farmers and indigenous cultures. The critics have sought a moratorium on gene-drive field tests.

All this was hashed out over the course of nearly two weeks in the Egyptian city of Sharm el-Sheikh at a gathering of the Conference of the Parties, the governing body of the Convention on Biological Diversity, an international agreement signed in 1992. Under language approved Thursday, scientists will be able to continue their research on gene drives, but with strict limitations.

The gene-drive debate is part of a broader, contentious discussion about how, when and whether to use genetic engineering as a tool to combat diseases and achieve other public health and ecological goals. Technologies that are promising are also unnerving. There are urgent questions about boundaries, regulations, who’s in charge.

A news flash from China earlier this week revealed that a scientist allegedly tinkered with the genetic codes of embryos brought to term in the form of two apparently healthy twin baby girls, a feat that breached a clear ethical line imposed by the global scientific community. That kind of genetic engineering of humans, using the gene-editing tool CRISPR-Cas9, is not yet viewed as medically foolproof and has spawned fears of unintended consequences and “designer babies.”

Even as the global scientific community focused on events in China, attendees at the biodiversity conference in Egypt grappled with the difficult issue of gene drives. After many days of meetings, conference attendees crafted language that emphasizes a precautionary approach. Research efforts would have to show that the re-engineered organisms pose no hazard. Any field test would require the “free, prior and informed consent” of people who live in the areas affected by the experiment. The language does not state precisely how and to what extent this consent would be defined and measured.

Both sides of the debate applauded the outcome.

“Given the potentially wide geographic reach of spreading gene drive systems, this requirement to seek or obtain consent from those who may ‘potentially’ be affected may in practice place a very high precautionary barrier to gene drive release moving forward,” Jim Thomas, co-executive director of the ETC Group, which has opposed the gene-drive research, told The Washington Post.

The adopted language, he said, “actually comes very close to a moratorium in practical terms."

A statement released by ETC Group and Friends of the Earth International quoted Mariann Bassey-Orovwuje, chair of the Alliance for Food Sovereignty in Africa: “In Africa we are all potentially affected and we do not want to be lab rats for this exterminator technology.”

But the advocates for gene drives were relieved that the conference did not impose a moratorium or provide obstacles that would make it pointless to keep doing research. More than 200 million people around the planet suffered from malaria in 2017, and 435,000 of them died, with most of the victims being children in Africa, according to the Gates Foundation.

“We don’t think gene drive is a magic bullet. We don’t think you can eradicate malaria with just one tool,” said Delphine Thizy, a political scientist at Imperial College London and the stakeholder-engagement manager for Target Malaria. But, she said, “it’s a complementary tool.”

Kevin Esvelt, a molecular biologist at MIT who is a pioneer of gene-drive technology, said he was pleased by the agreement in Egypt. “Gene drive technology promises to help solve ecological problems using the language of nature,” he said. “Better that we use DNA than potentially inhumane pesticides.”

During the conference, Esvelt, who was not in attendance, heard about fears that gene drives could be misused by corporations. He went on Twitter and said he would oppose any for-profit use of the technology. He says gene drives are more likely to be embraced by the public — and thus more likely to save lives — if people don’t fear that profits rather than public health is the major motivation.

Representatives of a number of African nations joined with the pro-gene-drive camp to say that a moratorium would be a mistake.

“The political leadership at the African Union level has accepted the benefits of this technology,” Charles Mugoya, chief of the National Biosafety Committee in Uganda, told The Washington Post. “It’s a long way to get the benefits, but we have to start somewhere.”

That view was echoed by Fredros Okumu, director of science of the Ifakara Health Institute in Tanzania.

“There is a general fear that is associated with any new technology,” Okumu told The Post. He said many people in Africa view it as “foreign technology.” The key to winning approval of local communities to this kind of malaria eradication program is to fund research institutions in Africa and train African scientists who can then explain the benefits of gene drives to their fellow citizens, he said.

“There’s nothing we have that carries zero risk,” Okumu said. “The question is, how do we mitigate those risks so that we can maximize the gains associated with, potentially, the huge value that can come out of gene-drive research?”

This debate is far from over, and the issue is likely to come up again at future biodiversity-convention gatherings. The convention’s governing body meets every two years to discuss how to advance the goals of the convention and sort through thorny issues such as gene drives. Almost every nation is a signatory, though the United States, after signing, never ratified the convention, amid opposition in the Senate. The Vatican is the other prominent holdout.