Natural immunity is the most reliable way to protect yourself from viruses, bacteria and parasites. And the best way to acquire such immunity, in most cases, is to expose your immune system to the bug in question—either by getting infected or getting immunized.

Until now, such protection was only possible with diseases like chicken pox or polio. But now, scientists at Harvard University say that people might soon arm themselves against HIV in a similar way, but through a different method.

Chad Cowan and Derrick Rossi, both in the department of stem cell and regenerative biology at Harvard University, and their colleagues report in the journal Cell Stem Cell that they have successfully edited the genomes of blood cells to make them impervious to HIV. In order survive, HIV needs to insert its genome into that of a healthy cell, and to infect these cells, HIV latches onto a protein on their surface called CCR5. If CCR5 is mutated, however, it’s as if the locks have been changed and HIV no longer has the right key; it can’t attach itself and the cells are protected from infection. So the scientists tried a new gene editing technique called CRISPR that allows them to precisely snip out parts of a cell’s genome, and they spliced out the CCR5 gene. To their surprise, the technique was relatively efficient, transforming about half of the cells they treated with CRISPR into CCR5-free, or HIV-resistant, cells.

“It was stunning to us how efficient CRISPR was in doing the genome editing,” says Cowan.

Scientists have previously used CRISPR to make another change in how HIV infects cells; they snipped out the HIV genes that the virus inserted into healthy cells. That process essentially returned HIV infected cells back to healthy ones.

The latest results, however, suggest that the technique may be useful even before HIV gets inside cells. CRISPR could be useful in treating HIV patients if it can replace patients’ own immune cells with the blockaded versions. The cells Cowan and Rossi used were blood stem cells, which give rise to the body’s entire blood and immune system. In order to work as a potential treatment for HIV, patients would provide a sample of blood stem cells from their bone marrow, which would be treated with CRISPR to remove the CCR5 gene, and these cells would be transplanted back to the patient. Since the bone marrow stem cells populate the entire blood and immune system, the patient would eventually have blood cells that were protected, or “immunized,” against HIV. “We’re removing the doorway that HIV uses to get into cells,” says Cowan.

To test this idea, they are already working with another research group to see if the HIV-impervious cells can treat mice infected with HIV.

Because healthy cells would be barricaded from HIV, the process might also lead to a cure for the disease. While the results are currently being tested to treat animals already infected with HIV, it may also be possible to one day transform a person’s immune cell genomes to be protected against the virus. Some people are already fortunate enough to be protected this way—a small percentage of people of European ancestry have natural immunity against HIV because they have two copies of mutated CCR5. They have been well studied and so far, their CCR5 aberrations don’t seem to be linked to any known health issues. “They are totally normal except for the fact that they are resistant to HIV,” says Cowan. “That’s a heartening thing: to have a group of people who are alive today who have been studied and looked at and seem totally fine.”

That’s why clinicians who research the virus and treat HIV patients are excited by the possibilities of CRISPR-aided strategies. If it’s possible to close the door on HIV, then it may be realistic to start thinking about closing the door on the AIDS epidemic in the near future.

Read next: How Meditation May Help People With HIV

Listen to the most important stories of the day.

Contact us at letters@time.com.