The long-term persistence of antibiotic-resistant bacteria depends on their fitness relative to other genotypes in the absence of drugs. Outside the laboratory, viruses that parasitize bacteria (phages) are ubiquitous, but costs of antibiotic resistance are typically studied in phage-free experimental conditions. We used a mathematical model and experiments with Escherichia coli to show that lytic phages strongly affect the incidence of antibiotic resistance in drug-free conditions. Under phage parasitism, the likelihood that antibiotic-resistant genetic backgrounds spread depends on their initial frequency, mutation rate and intrinsic growth rate relative to drug-susceptible genotypes, because these parameters determine relative rates of phage-resistance evolution on different genetic backgrounds. Moreover, the average cost of antibiotic resistance in terms of intrinsic growth in the antibiotic-free experimental environment was small relative to the benefits of an increased mutation rate in the presence of phages. This is consistent with our theoretical work indicating that, under phage selection, typical costs of antibiotic resistance can be outweighed by realistic increases in mutability if drug resistance and hypermutability are genetically linked, as is frequently observed in clinical isolates. This suggests the long-term distribution of antibiotic resistance depends on the relative rates at which different lineages adapt to other types of selection, which in the case of phage parasitism is probably extremely common, as well as costs of resistance inferred by classical in vitro methods.