Scientists have used gene-editing technology to knock out pig diseases that could spread to humans, a move that could bring us closer to transplanting organs from that animal into sick people.

A study in the journal Science says the research team used a gene-editing tool called CRISPR-Cas9 on pig cells to inactivate viruses that could spread from pigs to humans, then cloned those cells to generate embryos that grew into full piglets. The result was animals that were not carrying active forms of the potentially harmful viruses, which would normally become integrated into the offspring’s DNA. According to the study, the method can “prevent cross-species viral transmission.”

Read: Does Editing Genes Start a Chain Reaction in Someone's DNA?

Using organs from another animal “is a promising strategy to alleviate the shortage of organs for human transplantation,” the study notes, but one major concern is illnesses that could be transmitted from pigs to humans. Researchers refer to them as porcine endogenous retroviruses — PERVs for short.

People with compromised immune systems could be particularly at risk from these retroviruses, as the viral DNA would more easily proliferate through their cells, but editing genes using the scientists’ method may solve that problem.

Human patients have received heart valves, skin or pancreas cells from pigs, but not full organs. Experts have long looked at pig organs as having the potential to make a dent in the massive organ transplant waiting lists.

The United Network for Organ Sharing says the list of people who need an organ to save their lives is in the tens of thousands, with kidneys representing the greatest need. It is followed by livers, hearts and then lungs.

“About 22 people a day die waiting for a transplant,” Dr. David Cooper, a University of Alabama at Birmingham researcher who has experimented with gene-editing technology to make animal organs compatible with humans, told the New York Times. “If you could help them with a pig organ, wouldn’t that be wonderful?”

Artificial organs are another possible lifesaver, but like gene-editing pig cells to create transplantable organs, the technology is not complete. Researchers at the Swiss university ETH Zurich recently reported creating an artificial heart out of silicone with a 3D printer, one that mimics the beating of a real heart using air pressure, but it was only able to last for about 3,000 beats — equal to between 30 and 45 minutes of pumping before the material could no longer take the strain.

Watch: Scientists Record DNA Copying and Pasting Itself

The announcement that scientists had successfully edited porcine endogenous retroviruses out of pig genes and created clean offspring comes just a couple weeks after another advance for CRISPR technology. At the end of July, it was reported that researchers in Oregon used the gene-editing technology on human embryos for the first time. That group had removed harmful genes from the embryos after receiving sperm donations from men who carried disease-causing genetic mutations. After applying CRISPR to the embryos, the scientists allowed them to grow for a few days. The embryos were not implanted into a womb.