Antibiotic resistance is an increasing global problem resulting from the pressure of antibiotic usage, greater mobility of the population, and industrialization. Many antibiotic resistance genes are believed to have originated in microorganisms in the environment, and to have been transferred to other bacteria through mobile genetic elements. Among others, β-lactam antibiotics show clinical efficacy and low toxicity, and they are thus widely used as antimicrobials. Resistance to β-lactam antibiotics is conferred by β-lactamase genes and penicillin-binding proteins, which are chromosomal- or plasmid-encoded, although there is little information available on the contribution of other mobile genetic elements, such as phages. This study is focused on three genes that confer resistance to β-lactam antibiotics, namely two β-lactamase genes (blaTEM and blaCTX-M9) and one encoding a penicillin-binding protein (mecA) in bacteriophage DNA isolated from environmental water samples. The three genes were quantified in the DNA isolated from bacteriophages collected from 30 urban sewage and river water samples, using quantitative PCR amplification. All three genes were detected in the DNA of phages from all the samples tested, in some cases reaching 104 gene copies (GC) of blaTEM or 102 GC of blaCTX-M and mecA. These values are consistent with the amount of fecal pollution in the sample, except for mecA, which showed a higher number of copies in river water samples than in urban sewage. The bla genes from phage DNA were transferred by electroporation to sensitive host bacteria, which became resistant to ampicillin. blaTEM and blaCTX were detected in the DNA of the resistant clones after transfection. This study indicates that phages are reservoirs of resistance genes in the environment.