CRISPR/Cas systems were first identified in bacteria and archaea as a defense mechanism against viral infections. The system works by capturing snippets of DNA from invading viruses and storing them in the bacterial genome. When the same virus attacks again, the bacteria produce RNA segments from the CRISPR sequences to target the viral DNA, guided by the Cas proteins, which then cut the DNA, neutralizing the threat.