Tests with the virus, called Porcine Reproductive and Respiratory Syndrome (PRRS), found the pigs did not become infected, while the change in their DNA had no other impact on their health.
Researchers at the University of Edinburgh’s Roslin Institute said PRRS is endemic in most pig-producing countries, with vaccines mostly failing to stop its spread.
The virus, which causes breathing problems and deaths in young animals, is said to cost the farming industry around £1.75 billion each year in lost revenue in the US and Europe.
Scientists used gene editing techniques to remove a small section of the CD163 gene which the PRRS virus attaches to.
Previous lab-based studies had shown that cells could be made resistant to the virus but the university said this was the first time the pigs had been exposed to the virus.
They found that none of the animals became ill when exposed to the virus and blood tests found no trace of the infection.
Dr Christine Tait-Burkard of the Roslin Institute said: “These results are exciting but it will still likely be several years before we’re eating bacon sandwiches from PRRS-resistant pigs.
“First and foremost we need broader public discussion on the acceptability of gene-edited meat entering our food chain, to help inform political leaders on how these techniques should be regulated.
“We also need to carry out longer term studies to confirm that these genetic changes do not have any unforeseen adverse effects on the animals.
“If these studies are successful and the public are accepting of this technology, we would then be looking to work with pig breeding companies to integrate these gene edits into commercial breeding stocks.”
Genetically modified animals are banned from the food chain in Europe. The research team said it is not clear what regulations would apply to gene-edited animals as the process speeds up natural processes rather than introducing genes of other species into an animal.
The university team worked with Genus PLC to produce pigs with the specific DNA change.
The research, co-funded by the Biotechnology and Biological Sciences Research Council and Genus, is published in the Journal of Virology.
Jonathan Lightner, chief scientific officer for Genus, said: “These results are very exciting and further underscore the potential, through gene editing, to provide incredible benefits to the global pork industry, and society as a whole, by improving animal health.
“We look forward to further collaboration with the University on this exciting project.”