By comparing thousands of bacterial genomes, scientists have traced back the evolutionary history of antibiotic resistance genes. In almost all cases where an origin could be determined, the gene started to spread from bacteria that, themselves, can cause disease.