Lambdoid (or Lambda-like) phages, are a group of related temperate phages that can infect Escherichia coli and other gut bacteria. A key characteristic of these phages is their mosaic genome structure which served as basis for the “modular genome hypothesis”. Accordingly, lambdoid phages evolve by transferring genomic regions, each of which constitutes a functional unit. Nevertheless, it is unknown which genes are preferentially transferred together and what drives such co-transfer events. Here we aim to characterize genome modularity by studying co-transfer of genes among 95 distantly related lambdoid (pro-)phages. Based on gene content, we observed that the genomes cluster into twelve groups, which are characterized by a highly similar gene content within the groups and highly divergent gene content across groups. Highly similar proteins can occur in genomes of different groups, indicating that they have been transferred. About 26% of homologous protein clusters in the four known operons (i.e., the early left, early right, immunity, and late operon) engage in gene transfer, which affects all operons to a similar extent. We identified pairs of genes that are frequently co-transferred and observed that these pairs tend to be in close proximity to one another on the genome. We find that frequently co-transferred genes are involved in related functions and highlight interesting examples involving structural proteins, the CI repressor and Cro regulator, proteins interacting with DNA, and membrane-interacting proteins. We conclude that epistatic effects, where the functioning of one protein depends on the presence of another, plays an important role in the evolution of the modular structure of these genomes.Data summaryThe genomes used in this research are publicly available (Table S1). All supporting data is available in supplementary tables. Source code and documentation to calculate GRR is available under GPLv2 (https://github.com/annecmg/GRRpair).Impact statementTemperate phages, viruses that can integrate their own genetic material into bacterial genomes, are pervasive mobile genetic elements that can influence bacterial fitness in manifold ways. The E. coli phage lambda has been a model phage of molecular biology for decades. Lambdoid phages are highly prevalent in Enterobacteria such as E. coli and Salmonella, have a mosaic-like genome, the same genome architecture as lambda, and can recombine with phage lambda. Nevertheless, these phages can be very distinct, and no lambdoid core genome exits. Although lambdoid phage genomes have been studied for decades, we know relatively little about how they evolve. Early observations led to the modular genome hypothesis, according to which, phages are assemblages of genetic modules. But what determines the structure of these modules and which genes do preferentially occur together in modules? In this study, we provide answers to these questions using a novel computational approach that allows to infer gene transfer events between distantly related phages despite the absence of a core genome.We find that co-transfer of functionally related genes is frequent during the evolution of lambdoid phages. This suggests epistatic interactions among these genes, i.e., the co-transferred genes likely need to function together to ensure a viable phage. A prime example is the co-transfer of structural genes, such as genes encoding for the phage capsid or the phage tail. Additionally, we also find co-transfer of known interacting regulatory genes and co-transfer between functionally related genes that have so far been unknown to interact. Together, our analysis provides novel insights into the evolution of temperate phages. Moreover, our approach, which allows to identify gene transfer in the absence of a core phylogeny might be valuable for studying the evolution of other fast-evolving genomes, including viruses of other hosts.