Some strains of the bacterium Streptococcus pyogenes secrete poisonous substances called exotoxins. The genes encoding the exotoxins are thought to have originated in bacteriophages, which are viruses that infect bacteria.

Which of the following is the most likely mechanism by which the S. pyogenes acquired the ability to produce the exotoxins?