In sum, we show that a targeted pathogen is more likely to survive a phage attack if growing on a solid surface, in the presence of a phage-resistant competitor. It is also most likely to develop resistance to the phage in the absence of competitors, where it can grow to a sufficiently large population size. Competing species thus reduce the likelihood of resistance evolution, but may create a haven for phage-sensitive pathogens that can spread if dispersed.