Bacteria engage in a complex network of ecological interactions, which includes mobile genetic elements (MGEs) such as phages and plasmids. These elements play a key role in microbial communities as vectors of horizontal gene transfer but can also be important sources of selection for their bacterial hosts. In natural communities bacteria are likely to encounter multiple MGEs simultaneously and conflicting selection among MGEs could alter the bacterial evolutionary response to each MGE. Here we test the effect of interactions with multiple MGEs on bacterial molecular evolution in the tripartite interaction between the bacterium, Pseudomonas fluorescens, the lytic bacteriophage SBW25φ2 and conjugative plasmid, pQBR103, using genome sequencing of experimentally evolved bacteria. We show that, individually, both plasmids and phages impose selection leading to bacterial evolutionary responses that are distinct from bacterial populations evolving without MGEs, but that together, plasmids and phages impose conflicting selection on bacteria, constraining the evolutionary responses observed in pairwise interactions. Our findings highlight the likely difficulties of predicting evolutionary responses to multiple selective pressures from the observed evolutionary responses to each selective pressure alone. Understanding evolution in complex microbial communities comprising many species and MGEs will require that we go beyond studies of pairwise interactions.