The scientists have given a common type of bacterium a unique genetic code that makes it dependent for survival on unnatural amino acids that must be fed to it. If such organisms escaped into the wild, where those amino acids are not available, they would die.

“It really addresses a longstanding problem in biotechnology,” said Farren Isaacs, an assistant professor of molecular, cell and developmental biology at Yale, who led one of the research groups. He called it a “really compelling solution to engineering biocontainment, or biological barriers that limit the spread and survival of organisms in natural environments.”

A paper by his team and one from a group led by George M. Church at Harvard Medical School were published online Wednesday by the journal Nature.