Effective clearance of an infection requires that the immune system rapidly detects and neutralizes invading parasites, while strictly avoiding self-antigens that would result in autoimmunity. The sophisticated cellular machinery and signaling pathways that coordinate an effective immune response have generally been considered to be properties of the eukaryotic immune system. However, a surprisingly sophisticated adaptive immune system that relies on small RNAs for sequence specific targeting of invading parasites has recently been discovered in bacteria and archaea.